diff options
author | stuconnolly <stuart02@gmail.com> | 2010-10-17 14:03:37 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-10-17 14:03:37 +0000 |
commit | 48e6751fa18dd030815917c2f613fa6604e05cb8 (patch) | |
tree | a19a5b263c703fa4165bac8d9fe7dd5f8674748f /UnitTests/SPDatabaseInfoTest.m | |
parent | c11cf1b6014c84523a7c876288b396ed85e4b0b2 (diff) | |
download | sequelpro-48e6751fa18dd030815917c2f613fa6604e05cb8.tar.gz sequelpro-48e6751fa18dd030815917c2f613fa6604e05cb8.tar.bz2 sequelpro-48e6751fa18dd030815917c2f613fa6604e05cb8.zip |
Tidy up the project's logical structure in Xcode.
Diffstat (limited to 'UnitTests/SPDatabaseInfoTest.m')
-rw-r--r-- | UnitTests/SPDatabaseInfoTest.m | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/UnitTests/SPDatabaseInfoTest.m b/UnitTests/SPDatabaseInfoTest.m index a53104e9..fc2309e3 100644 --- a/UnitTests/SPDatabaseInfoTest.m +++ b/UnitTests/SPDatabaseInfoTest.m @@ -24,28 +24,35 @@ // More info at <http://code.google.com/p/sequel-pro/> #import <OCMock/OCMock.h> + #import "SPDatabaseInfo.h" #import "SPDatabaseInfoTest.h" - @implementation SPDatabaseInfoTest -- (SPDatabaseInfo *)getDatabaseInfoFixture { +- (SPDatabaseInfo *)getDatabaseInfoFixture +{ SPDatabaseInfo *dbInfo = [[SPDatabaseInfo alloc] init]; + return dbInfo; } -- (id) getMockConnection { +- (id) getMockConnection +{ id mockConnection = [OCMockObject niceMockForClass:[MCPConnection class]]; + return mockConnection; } -- (id) getMockMCPResult { +- (id) getMockMCPResult +{ id mockResult = [OCMockObject niceMockForClass:[MCPResult class]]; + return mockResult; } -- (void)testDatabaseExists { +- (void)testDatabaseExists +{ SPDatabaseInfo *dbInfo = [self getDatabaseInfoFixture]; NSArray *tables = [[NSArray alloc] initWithObjects: @"db_one", nil]; @@ -62,7 +69,8 @@ [mockConnection verify]; } -- (void)testListDBs { +- (void)testListDBs +{ SPDatabaseInfo *dbInfo = [self getDatabaseInfoFixture]; id mockConnection = [self getMockConnection]; [[mockConnection expect] queryString:@"SHOW DATABASES"]; @@ -71,7 +79,8 @@ [mockConnection verify]; } -- (void)testListDBsLike { +- (void)testListDBsLike +{ SPDatabaseInfo *dbInfo = [self getDatabaseInfoFixture]; id mockConnection = [self getMockConnection]; [[mockConnection expect] queryString:@"SHOW DATABASES LIKE `test_db`"]; @@ -80,5 +89,4 @@ [mockConnection verify]; } - @end |