diff options
Diffstat (limited to 'UnitTests/SPDatabaseCopyTest.m')
-rw-r--r-- | UnitTests/SPDatabaseCopyTest.m | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/UnitTests/SPDatabaseCopyTest.m b/UnitTests/SPDatabaseCopyTest.m index df4807b9..358e0c1e 100644 --- a/UnitTests/SPDatabaseCopyTest.m +++ b/UnitTests/SPDatabaseCopyTest.m @@ -29,34 +29,27 @@ #import "SPDatabaseCopyTest.h" #import "SPDatabaseCopy.h" #import "SPTableCopy.h" -#import "MCPConnection.h" -#import "SPDatabaseInfo.h" #import "SPLogger.h" @implementation SPDatabaseCopyTest -- (SPDatabaseCopy *) getDatabaseCopyFixture { - SPDatabaseCopy *dbCopy = [[SPDatabaseCopy alloc] init]; - return [dbCopy autorelease]; -} - -- (SPTableCopy *) getTableCopyFixture { - SPTableCopy *tableCopy = [[SPTableCopy alloc] init]; - return [tableCopy autorelease]; +- (SPDatabaseCopy *)getDatabaseCopyFixture +{ + return [[[SPDatabaseCopy alloc] init] autorelease]; } -- (id) getMockConnection { - id mockConnection = [OCMockObject niceMockForClass:[MCPConnection class]]; - return mockConnection; +- (SPTableCopy *)getTableCopyFixture +{ + return [[[SPTableCopy alloc] init] autorelease]; } -- (id) getMockDBInfo { - id mockDBInfo = [OCMockObject niceMockForClass:[SPDatabaseInfo class]]; - return mockDBInfo; +- (id)getMockConnection +{ + return [OCMockObject niceMockForClass:[SPMySQLConnection class]]; } -- (void)testCopyDatabase { - +- (void)testCopyDatabase +{ SPDatabaseCopy *dbCopy = [self getDatabaseCopyFixture]; id mockConnection = [self getMockConnection]; [[mockConnection expect] queryString:@"CREATE DATABASE `target_name`"]; |