From 48e6751fa18dd030815917c2f613fa6604e05cb8 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 17 Oct 2010 14:03:37 +0000 Subject: Tidy up the project's logical structure in Xcode. --- UnitTests/SPDatabaseInfoTest.m | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'UnitTests/SPDatabaseInfoTest.m') 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 #import + #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 -- cgit v1.2.3