Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
93789c30
Commit
93789c30
authored
12 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
Updated the test to match the new three-action model
SVN: 27348
parent
b365f717
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis-ipad/BisKit/Tests/CISDOBLiveConnectionTest.m
+16
-13
16 additions, 13 deletions
openbis-ipad/BisKit/Tests/CISDOBLiveConnectionTest.m
with
16 additions
and
13 deletions
openbis-ipad/BisKit/Tests/CISDOBLiveConnectionTest.m
+
16
−
13
View file @
93789c30
...
@@ -60,16 +60,6 @@
...
@@ -60,16 +60,6 @@
return
nil
;
return
nil
;
}
}
-
(
void
)
assertServiceDataRowIsParsable
:(
NSArray
*
)
row
{
//
The
only
column
we
need
to
check
is
the
properties
column
,
which
is
the
last
one
.
NSDictionary
*
propertiesRow
=
[
row
objectAtIndex
:
[
row
count
]
-
1
];
NSString
*
propertiesValue
=
[
propertiesRow
objectForKey
:
@
"value"
];
NSError
*
error
;
NSDictionary
*
jsonProperties
=
[
NSJSONSerialization
JSONObjectWithData
:[
propertiesValue
dataUsingEncoding
:
NSUTF8StringEncoding
]
options
:
0
error
:
&
error
];
STAssertNotNil
(
jsonProperties
,
@
"Properties should have been parsed, %@"
,
error
);
}
-
(
void
)
testLoginAndListServices
-
(
void
)
testLoginAndListServices
{
{
CISDOBAsyncCall
*
call
;
CISDOBAsyncCall
*
call
;
...
@@ -79,9 +69,11 @@
...
@@ -79,9 +69,11 @@
call
=
[
_
connection
listAggregationServices
];
call
=
[
_
connection
listAggregationServices
];
[
self
configureAndRunCallSynchronously
:
call
];
[
self
configureAndRunCallSynchronously
:
call
];
STAssertNotNil
(
_
callResult
,
@
"There should be some aggregation services on the server"
);
STAssertNotNil
(
_
callResult
,
@
"There should be some aggregation services on the server"
);
NSDictionary
*
service
=
[
self
extractIpadService
:
_
callResult
];
NSDictionary
*
service
=
[
self
extractIpadService
:
_
callResult
];
[
service
retain
];
STAssertNotNil
(
service
,
@
"There should be a service with key \"
ipad
-
read
-
service
-
v1
\
". Services: %@"
,
_
callResult
);
STAssertNotNil
(
service
,
@
"There should be a service with key \"
ipad
-
read
-
service
-
v1
\
". Services: %@"
,
_
callResult
);
//
Call
without
any
parameters
call
=
call
=
[
_
connection
[
_
connection
createReportFromDataStore
:
[
service
objectForKey
:
@
"dataStoreCode"
]
createReportFromDataStore
:
[
service
objectForKey
:
@
"dataStoreCode"
]
...
@@ -90,9 +82,20 @@
...
@@ -90,9 +82,20 @@
[
self
configureAndRunCallSynchronously
:
call
];
[
self
configureAndRunCallSynchronously
:
call
];
STAssertNotNil
(
_
callResult
,
@
"The ipad-read-service-v1 should have returned some data."
);
STAssertNotNil
(
_
callResult
,
@
"The ipad-read-service-v1 should have returned some data."
);
NSArray
*
rows
=
[
_
callResult
objectForKey
:
@
"rows"
];
NSArray
*
rows
=
[
_
callResult
objectForKey
:
@
"rows"
];
STAssertTrue
([
rows
count
]
==
0
,
@
"The ipad-read-service-v1 should have returned empty data."
);
//
Call
with
the
correct
parameters
NSDictionary
*
parameters
=
[
NSDictionary
dictionaryWithObject
:
@
"ROOT"
forKey
:
@
"requestKey"
];
call
=
[
_
connection
createReportFromDataStore
:
[
service
objectForKey
:
@
"dataStoreCode"
]
aggregationService
:
[
service
objectForKey
:
@
"serviceKey"
]
parameters
:
parameters
];
[
self
configureAndRunCallSynchronously
:
call
];
STAssertNotNil
(
_
callResult
,
@
"The ipad-read-service-v1 should have returned some data."
);
rows
=
[
_
callResult
objectForKey
:
@
"rows"
];
STAssertTrue
([
rows
count
]
>
0
,
@
"The ipad-read-service-v1 should have returned some data."
);
STAssertTrue
([
rows
count
]
>
0
,
@
"The ipad-read-service-v1 should have returned some data."
);
for
(
NSArray
*
row
in
rows
)
[
service
release
];
[
self
assertServiceDataRowIsParsable
:
row
];
}
}
@
end
@
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment