-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds testConnectUsingMongoUrl and testGetMongoInfo
- Loading branch information
1 parent
a4e6718
commit e63e99b
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Class { | ||
#name : #MaplessMongoAPITest, | ||
#superclass : #MaplessTestCase, | ||
#category : #'Mapless-Mongo-Tests-Tests' | ||
} | ||
|
||
{ #category : #tests } | ||
MaplessMongoAPITest >> testConnectUsingMongoUrl [ | ||
|
||
| api mongoUrl | | ||
api := MongoAPI mongoUrl: 'mongodb://localhost:27017/Mapless-Test'. | ||
api open. | ||
self assert: api isValid. | ||
api close. | ||
self deny: api isValid. | ||
mongoUrl := ZnUrl fromString: 'mongodb://localhost:27017'. | ||
self assert: api asMongoUrl equals: mongoUrl. | ||
|
||
self assert: (api isAt: mongoUrl) | ||
] | ||
|
||
{ #category : #tests } | ||
MaplessMongoAPITest >> testGetMongoInfo [ | ||
|
||
| api | | ||
api := MongoAPI mongoUrl: 'mongodb://localhost:27017/Mapless-Test'. | ||
api open. | ||
|
||
self assert: api admin isMaster class equals: MongoIsMaster. | ||
api close | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters