diff options
author | stuconnolly <stuart02@gmail.com> | 2012-05-04 14:59:19 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-05-04 14:59:19 +0000 |
commit | f5710a1bb906bd9c8220fba162ebf29fa986aaa5 (patch) | |
tree | 9a23295ec8f489864cce6eaa187b3e945832986c /UnitTests/SPDatabaseCopyTest.m | |
parent | e188d1d53a1b1f8cf96d8ce82221f2013e63c23b (diff) | |
download | sequelpro-f5710a1bb906bd9c8220fba162ebf29fa986aaa5.tar.gz sequelpro-f5710a1bb906bd9c8220fba162ebf29fa986aaa5.tar.bz2 sequelpro-f5710a1bb906bd9c8220fba162ebf29fa986aaa5.zip |
Tidy up database action tests.
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`"]; |