Tuukka Norri avatar Tuukka Norri committed bc39c71

Applied the HOM name change to the unit tests

Comments (0)

Files changed (7)

UnitTests/Sources/BXConnectionTests.m

 }
 
 
+- (void) expected: (NSNotification *) n
+{
+	mExpectedCount++;
+}
+
+
+- (void) unexpected: (NSNotification *) n
+{
+	STAssertTrue (NO, @"Expected connection not to have been made.");
+}
+
+
 - (void) test6ConnectFail
 {
 	[mContext setDatabaseURI: [NSURL URLWithString: @"pgsql://localhost/anonexistantdatabase"]];
 	[self waitForConnectionAttempts: 3];
 	STAssertTrue (3 == mExpectedCount, @"Expected 3 connection attempts while there were %d.", mExpectedCount);
 }
-
-
-- (void) expected: (NSNotification *) n
-{
-	mExpectedCount++;
-}
-
-
-- (void) unexpected: (NSNotification *) n
-{
-	STAssertTrue (NO, @"Expected connection not to have been made.");
-}
 @end

UnitTests/Sources/BXHOMTests.h

+//
+// BXHOMTests.h
+// BaseTen
+//
+// Copyright (C) 2010 Marko Karppinen & Co. LLC.
+//
+// Before using this software, please review the available licensing options
+// by visiting http://basetenframework.org/licensing/ or by contacting
+// us at sales@karppinen.fi. Without an additional license, this software
+// may be distributed only in compliance with the GNU General Public License.
+//
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License, version 2.0,
+// as published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// $Id$
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+#import "BXTestCase.h"
+
+
+@interface BXHOMTests : BXTestCase
+{
+}
+@end

UnitTests/Sources/BXHOMTests.m

+//
+// BXHOMTests.m
+// BaseTen
+//
+// Copyright (C) 2010 Marko Karppinen & Co. LLC.
+//
+// Before using this software, please review the available licensing options
+// by visiting http://basetenframework.org/licensing/ or by contacting
+// us at sales@karppinen.fi. Without an additional license, this software
+// may be distributed only in compliance with the GNU General Public License.
+//
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License, version 2.0,
+// as published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// $Id$
+//
+
+#import "BXHOMTests.h"
+#import "MKCSenTestCaseAdditions.h"
+#import <OCMock/OCMock.h>
+#import <BaseTen/BXHOM.h>
+
+
+@implementation BXHOMTests
+- (void) test01ArrayAny
+{
+	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	id object = [array BX_Any];
+	MKCAssertTrue ([array containsObject: object]);
+}
+
+
+- (void) test02SetAny
+{
+	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
+	id object = [set BX_Any];
+	MKCAssertTrue ([set containsObject: object]);
+}
+
+
+- (void) test03DictAny
+{
+	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
+						  @"a", @"1",
+						  @"b", @"2",
+						  @"c", @"3",
+						  nil];
+	id object = [dict BX_Any];
+	MKCAssertTrue ([[dict allValues] containsObject: object]);
+}
+
+
+- (void) test04SetDo
+{
+	OCMockObject *m1 = [OCMockObject mockForClass: [NSNumber class]];
+	OCMockObject *m2 = [OCMockObject mockForClass: [NSNumber class]];
+	[[m1 expect] stringValue];
+	[[m2 expect] stringValue];
+	
+	NSSet *set = [NSSet setWithObjects: m1, m2, nil];
+	[[set BX_Do] stringValue];
+	
+	[m1 verify];
+	[m2 verify];
+}
+
+
+- (void) test05ArrayDo
+{
+	OCMockObject *m1 = [OCMockObject mockForClass: [NSNumber class]];
+	OCMockObject *m2 = [OCMockObject mockForClass: [NSNumber class]];
+	[[m1 expect] stringValue];
+	[[m2 expect] stringValue];
+	
+	NSArray *array = [NSArray arrayWithObjects: m1, m2, nil];
+	[[array BX_Do] stringValue];
+	
+	[m1 verify];
+	[m2 verify];
+}
+
+
+- (void) test06DictDo
+{
+	OCMockObject *m1 = [OCMockObject mockForClass: [NSNumber class]];
+	OCMockObject *m2 = [OCMockObject mockForClass: [NSNumber class]];
+	[[m1 expect] stringValue];
+	[[m2 expect] stringValue];
+
+	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
+						  m1, @"a",
+						  m2, @"b",
+						  nil];
+	[[dict BX_Do] stringValue];
+	
+	[m1 verify];
+	[m2 verify];
+}
+
+
+- (void) test07ArrayCollect
+{
+	NSArray *array1 = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	NSArray *array2 = (id) [[array1 BX_Collect] uppercaseString];
+	MKCAssertEqualObjects (array2, ([NSArray arrayWithObjects: @"A", @"B", @"C", nil]));
+}
+
+
+- (void) test08SetCollect
+{
+	NSSet *set1 = [NSSet setWithObjects: @"a", @"b", @"c", nil];
+	NSSet *set2 = (id) [[set1 BX_Collect] uppercaseString];
+	MKCAssertEqualObjects (set2, ([NSSet setWithObjects: @"A", @"B", @"C", nil]));
+}
+
+
+- (void) test09DictCollect
+{
+	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
+						  @"a", @"1",
+						  @"b", @"2",
+						  @"c", @"3",
+						  nil];
+	NSArray *array = (id) [[dict BX_Collect] uppercaseString];
+	MKCAssertEqualObjects (array, ([NSArray arrayWithObjects: @"A", @"B", @"C", nil]));
+}
+
+
+- (void) test10ArrayCollectRet
+{
+	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	NSSet *set = (id) [[array BX_CollectReturning: [NSMutableSet class]] uppercaseString];
+	MKCAssertEqualObjects (set, ([NSSet setWithObjects: @"A", @"B", @"C", nil]));
+}
+
+
+- (void) test11SetCollectRet
+{
+	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
+	NSArray *array = (id) [[set BX_CollectReturning: [NSMutableArray class]] uppercaseString];
+	MKCAssertEqualObjects ([array sortedArrayUsingSelector: @selector (compare:)],
+						   ([NSArray arrayWithObjects: @"A", @"B", @"C", nil]));
+}
+
+
+- (void) test12DictCollectRet
+{
+	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
+						  @"a", @"1",
+						  @"b", @"2",
+						  @"c", @"3",
+						  nil];
+	NSSet *set = (id) [[dict BX_CollectReturning: [NSMutableSet class]] uppercaseString];
+	MKCAssertEqualObjects (set, ([NSSet setWithObjects: @"A", @"B", @"C", nil]));
+}
+
+
+- (void) test13ArrayCollectD
+{
+	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	NSDictionary *dict = (id) [[array BX_CollectD] uppercaseString];
+	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
+								   @"a", @"A",
+								   @"b", @"B",
+								   @"c", @"C",
+								   nil]));
+}
+
+
+- (void) test14SetCollectD
+{
+	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
+	NSDictionary *dict = (id) [[set BX_CollectD] uppercaseString];
+	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
+								   @"a", @"A",
+								   @"b", @"B",
+								   @"c", @"C",
+								   nil]));
+}
+
+
+- (void) test15DictCollectD
+{
+	NSSet *dict1 = [NSDictionary dictionaryWithObjectsAndKeys:
+					@"a", @"1",
+					@"b", @"2",
+					@"c", @"3",
+					nil];
+	NSDictionary *dict2 = (id) [[dict1 BX_CollectD] uppercaseString];
+	MKCAssertEqualObjects (dict2, ([NSDictionary dictionaryWithObjectsAndKeys:
+									@"a", @"A",
+									@"b", @"B",
+									@"c", @"C",
+									nil]));
+}
+
+
+- (void) test16ArrayCollectDK
+{
+	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	NSDictionary *dict = (id) [[array BX_CollectDK] uppercaseString];
+	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
+								   @"A", @"a",
+								   @"B", @"b",
+								   @"C", @"c",
+								   nil]));
+}
+
+
+- (void) test17SetCollectDK
+{
+	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
+	NSDictionary *dict = (id) [[set BX_CollectDK] uppercaseString];
+	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
+								   @"A", @"a",
+								   @"B", @"b",
+								   @"C", @"c",
+								   nil]));
+}
+
+
+- (void) test18DictCollectDK
+{
+	NSSet *dict1 = [NSDictionary dictionaryWithObjectsAndKeys:
+					@"a", @"1",
+					@"b", @"2",
+					@"c", @"3",
+					nil];
+	NSDictionary *dict2 = (id) [[dict1 BX_CollectDK] uppercaseString];
+	MKCAssertEqualObjects (dict2, ([NSDictionary dictionaryWithObjectsAndKeys:
+									@"A", @"a",
+									@"B", @"b",
+									@"C", @"c",
+									nil]));
+}
+
+
+- (void) test19ArrayVisit
+{	
+	OCMockObject *mock = [OCMockObject mockForClass: [NSUserDefaults class]];
+	[[mock expect] objectIsForcedForKey: @"a" inDomain: @"b"];
+	
+	NSArray *array = [NSArray arrayWithObject: @"a"];
+	[[array BX_Visit: mock] objectIsForcedForKey: nil inDomain: @"b"];
+	
+	[mock verify];
+}
+
+
+- (void) test20ArrayVisit
+{	
+	OCMockObject *mock = [OCMockObject mockForClass: [NSUserDefaults class]];
+	[[mock expect] objectIsForcedForKey: @"a" inDomain: @"b"];
+	
+	NSSet *set = [NSSet setWithObject: @"a"];
+	[[set BX_Visit: mock] objectIsForcedForKey: nil inDomain: @"b"];
+	
+	[mock verify];
+}
+
+
+- (void) test21DictVisit
+{	
+	OCMockObject *mock = [OCMockObject mockForClass: [NSUserDefaults class]];
+	[[mock expect] objectIsForcedForKey: @"a" inDomain: @"b"];
+	
+	NSDictionary *dict = [NSDictionary dictionaryWithObject: @"a" forKey: @"1"];
+	[[dict BX_Visit: mock] objectIsForcedForKey: nil inDomain: @"b"];
+	
+	[mock verify];
+}
+
+
+- (void) test22ArrayReverse
+{
+	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	MKCAssertEqualObjects ([array BX_Reverse], ([NSArray arrayWithObjects: @"c", @"b", @"a", nil]));
+}
+
+
+- (void) test23DictKeyCollectD
+{
+	NSDictionary *dict1 = [NSDictionary dictionaryWithObjectsAndKeys:
+						   @"1", @"a",
+						   @"2", @"b",
+						   @"3", @"c",
+						   nil];
+	NSDictionary *dict2 = (id) [[dict1 BX_KeyCollectD] uppercaseString];
+	MKCAssertEqualObjects (dict2, ([NSDictionary dictionaryWithObjectsAndKeys:
+									@"1", @"A",
+									@"2", @"B",
+									@"3", @"C",
+									nil]));	
+}
+
+
+static int
+SelectFunction (id object)
+{
+	int retval = 1;
+	if ([object isEqual: @"b"])
+		retval = 0;
+	return retval;
+}
+
+
+- (void) test24ArraySelectFunction
+{
+	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	MKCAssertEqualObjects ([array BX_SelectFunction: &SelectFunction], ([NSArray arrayWithObjects: @"a", @"c", nil]));
+}
+
+
+- (void) test25SetSelectFunction
+{
+	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
+	MKCAssertEqualObjects ([set BX_SelectFunction: &SelectFunction], ([NSSet setWithObjects: @"a", @"c", nil]));
+}
+
+
+- (void) test26ValueSelectFunction
+{
+	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
+						  @"a", @"1",
+						  @"b", @"2",
+						  @"c", @"3",
+						  nil];
+	MKCAssertEqualObjects ([dict BX_ValueSelectFunction: &SelectFunction], ([NSArray arrayWithObjects: @"a", @"c", nil]));
+}
+
+
+static int
+SelectFunction2 (id object, void *arg)
+{
+	assert ([(id) arg isEqual: @"k"]);
+	
+	int retval = 1;
+	if ([object isEqual: @"b"])
+		retval = 0;
+	return retval;
+}
+
+
+- (void) test27ArraySelectFunction
+{
+	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
+	MKCAssertEqualObjects ([array BX_SelectFunction: &SelectFunction2 argument: @"k"], ([NSArray arrayWithObjects: @"a", @"c", nil]));
+}
+
+
+- (void) test28SetSelectFunction
+{
+	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
+	MKCAssertEqualObjects ([set BX_SelectFunction: &SelectFunction2 argument: @"k"], ([NSSet setWithObjects: @"a", @"c", nil]));
+}
+
+
+- (void) test29ValueSelectFunction
+{
+	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
+						  @"a", @"1",
+						  @"b", @"2",
+						  @"c", @"3",
+						  nil];
+	MKCAssertEqualObjects ([dict BX_ValueSelectFunction: &SelectFunction2 argument: @"k"], ([NSArray arrayWithObjects: @"a", @"c", nil]));
+}
+@end

UnitTests/Sources/PGTSHOMTests.h

-//
-// PGTSHOMTests.h
-// BaseTen
-//
-// Copyright (C) 2010 Marko Karppinen & Co. LLC.
-//
-// Before using this software, please review the available licensing options
-// by visiting http://basetenframework.org/licensing/ or by contacting
-// us at sales@karppinen.fi. Without an additional license, this software
-// may be distributed only in compliance with the GNU General Public License.
-//
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2.0,
-// as published by the Free Software Foundation.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-// $Id$
-//
-
-#import <SenTestingKit/SenTestingKit.h>
-#import "BXTestCase.h"
-
-
-@interface PGTSHOMTests : BXTestCase
-{
-}
-@end

UnitTests/Sources/PGTSHOMTests.m

-//
-// PGTSHOMTests.m
-// BaseTen
-//
-// Copyright (C) 2010 Marko Karppinen & Co. LLC.
-//
-// Before using this software, please review the available licensing options
-// by visiting http://basetenframework.org/licensing/ or by contacting
-// us at sales@karppinen.fi. Without an additional license, this software
-// may be distributed only in compliance with the GNU General Public License.
-//
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2.0,
-// as published by the Free Software Foundation.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-// $Id$
-//
-
-#import "PGTSHOMTests.h"
-#import "MKCSenTestCaseAdditions.h"
-#import <OCMock/OCMock.h>
-#import <BaseTen/PGTSHOM.h>
-
-
-@implementation PGTSHOMTests
-- (void) test01ArrayAny
-{
-	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	id object = [array PGTSAny];
-	MKCAssertTrue ([array containsObject: object]);
-}
-
-
-- (void) test02SetAny
-{
-	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
-	id object = [set PGTSAny];
-	MKCAssertTrue ([set containsObject: object]);
-}
-
-
-- (void) test03DictAny
-{
-	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-						  @"a", @"1",
-						  @"b", @"2",
-						  @"c", @"3",
-						  nil];
-	id object = [dict PGTSAny];
-	MKCAssertTrue ([[dict allValues] containsObject: object]);
-}
-
-
-- (void) test04SetDo
-{
-	OCMockObject *m1 = [OCMockObject mockForClass: [NSNumber class]];
-	OCMockObject *m2 = [OCMockObject mockForClass: [NSNumber class]];
-	[[m1 expect] stringValue];
-	[[m2 expect] stringValue];
-	
-	NSSet *set = [NSSet setWithObjects: m1, m2, nil];
-	[[set PGTSDo] stringValue];
-	
-	[m1 verify];
-	[m2 verify];
-}
-
-
-- (void) test05ArrayDo
-{
-	OCMockObject *m1 = [OCMockObject mockForClass: [NSNumber class]];
-	OCMockObject *m2 = [OCMockObject mockForClass: [NSNumber class]];
-	[[m1 expect] stringValue];
-	[[m2 expect] stringValue];
-	
-	NSArray *array = [NSArray arrayWithObjects: m1, m2, nil];
-	[[array PGTSDo] stringValue];
-	
-	[m1 verify];
-	[m2 verify];
-}
-
-
-- (void) test06DictDo
-{
-	OCMockObject *m1 = [OCMockObject mockForClass: [NSNumber class]];
-	OCMockObject *m2 = [OCMockObject mockForClass: [NSNumber class]];
-	[[m1 expect] stringValue];
-	[[m2 expect] stringValue];
-
-	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-						  m1, @"a",
-						  m2, @"b",
-						  nil];
-	[[dict PGTSDo] stringValue];
-	
-	[m1 verify];
-	[m2 verify];
-}
-
-
-- (void) test07ArrayCollect
-{
-	NSArray *array1 = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	NSArray *array2 = (id) [[array1 PGTSCollect] uppercaseString];
-	MKCAssertEqualObjects (array2, ([NSArray arrayWithObjects: @"A", @"B", @"C", nil]));
-}
-
-
-- (void) test08SetCollect
-{
-	NSSet *set1 = [NSSet setWithObjects: @"a", @"b", @"c", nil];
-	NSSet *set2 = (id) [[set1 PGTSCollect] uppercaseString];
-	MKCAssertEqualObjects (set2, ([NSSet setWithObjects: @"A", @"B", @"C", nil]));
-}
-
-
-- (void) test09DictCollect
-{
-	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-						  @"a", @"1",
-						  @"b", @"2",
-						  @"c", @"3",
-						  nil];
-	NSArray *array = (id) [[dict PGTSCollect] uppercaseString];
-	MKCAssertEqualObjects (array, ([NSArray arrayWithObjects: @"A", @"B", @"C", nil]));
-}
-
-
-- (void) test10ArrayCollectRet
-{
-	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	NSSet *set = (id) [[array PGTSCollectReturning: [NSMutableSet class]] uppercaseString];
-	MKCAssertEqualObjects (set, ([NSSet setWithObjects: @"A", @"B", @"C", nil]));
-}
-
-
-- (void) test11SetCollectRet
-{
-	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
-	NSArray *array = (id) [[set PGTSCollectReturning: [NSMutableArray class]] uppercaseString];
-	MKCAssertEqualObjects ([array sortedArrayUsingSelector: @selector (compare:)],
-						   ([NSArray arrayWithObjects: @"A", @"B", @"C", nil]));
-}
-
-
-- (void) test12DictCollectRet
-{
-	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-						  @"a", @"1",
-						  @"b", @"2",
-						  @"c", @"3",
-						  nil];
-	NSSet *set = (id) [[dict PGTSCollectReturning: [NSMutableSet class]] uppercaseString];
-	MKCAssertEqualObjects (set, ([NSSet setWithObjects: @"A", @"B", @"C", nil]));
-}
-
-
-- (void) test13ArrayCollectD
-{
-	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	NSDictionary *dict = (id) [[array PGTSCollectD] uppercaseString];
-	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
-								   @"a", @"A",
-								   @"b", @"B",
-								   @"c", @"C",
-								   nil]));
-}
-
-
-- (void) test14SetCollectD
-{
-	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
-	NSDictionary *dict = (id) [[set PGTSCollectD] uppercaseString];
-	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
-								   @"a", @"A",
-								   @"b", @"B",
-								   @"c", @"C",
-								   nil]));
-}
-
-
-- (void) test15DictCollectD
-{
-	NSSet *dict1 = [NSDictionary dictionaryWithObjectsAndKeys:
-					@"a", @"1",
-					@"b", @"2",
-					@"c", @"3",
-					nil];
-	NSDictionary *dict2 = (id) [[dict1 PGTSCollectD] uppercaseString];
-	MKCAssertEqualObjects (dict2, ([NSDictionary dictionaryWithObjectsAndKeys:
-									@"a", @"A",
-									@"b", @"B",
-									@"c", @"C",
-									nil]));
-}
-
-
-- (void) test16ArrayCollectDK
-{
-	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	NSDictionary *dict = (id) [[array PGTSCollectDK] uppercaseString];
-	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
-								   @"A", @"a",
-								   @"B", @"b",
-								   @"C", @"c",
-								   nil]));
-}
-
-
-- (void) test17SetCollectDK
-{
-	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
-	NSDictionary *dict = (id) [[set PGTSCollectDK] uppercaseString];
-	MKCAssertEqualObjects (dict, ([NSDictionary dictionaryWithObjectsAndKeys:
-								   @"A", @"a",
-								   @"B", @"b",
-								   @"C", @"c",
-								   nil]));
-}
-
-
-- (void) test18DictCollectDK
-{
-	NSSet *dict1 = [NSDictionary dictionaryWithObjectsAndKeys:
-					@"a", @"1",
-					@"b", @"2",
-					@"c", @"3",
-					nil];
-	NSDictionary *dict2 = (id) [[dict1 PGTSCollectDK] uppercaseString];
-	MKCAssertEqualObjects (dict2, ([NSDictionary dictionaryWithObjectsAndKeys:
-									@"A", @"a",
-									@"B", @"b",
-									@"C", @"c",
-									nil]));
-}
-
-
-- (void) test19ArrayVisit
-{	
-	OCMockObject *mock = [OCMockObject mockForClass: [NSUserDefaults class]];
-	[[mock expect] objectIsForcedForKey: @"a" inDomain: @"b"];
-	
-	NSArray *array = [NSArray arrayWithObject: @"a"];
-	[[array PGTSVisit: mock] objectIsForcedForKey: nil inDomain: @"b"];
-	
-	[mock verify];
-}
-
-
-- (void) test20ArrayVisit
-{	
-	OCMockObject *mock = [OCMockObject mockForClass: [NSUserDefaults class]];
-	[[mock expect] objectIsForcedForKey: @"a" inDomain: @"b"];
-	
-	NSSet *set = [NSSet setWithObject: @"a"];
-	[[set PGTSVisit: mock] objectIsForcedForKey: nil inDomain: @"b"];
-	
-	[mock verify];
-}
-
-
-- (void) test21DictVisit
-{	
-	OCMockObject *mock = [OCMockObject mockForClass: [NSUserDefaults class]];
-	[[mock expect] objectIsForcedForKey: @"a" inDomain: @"b"];
-	
-	NSDictionary *dict = [NSDictionary dictionaryWithObject: @"a" forKey: @"1"];
-	[[dict PGTSVisit: mock] objectIsForcedForKey: nil inDomain: @"b"];
-	
-	[mock verify];
-}
-
-
-- (void) test22ArrayReverse
-{
-	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	MKCAssertEqualObjects ([array PGTSReverse], ([NSArray arrayWithObjects: @"c", @"b", @"a", nil]));
-}
-
-
-- (void) test23DictKeyCollectD
-{
-	NSDictionary *dict1 = [NSDictionary dictionaryWithObjectsAndKeys:
-						   @"1", @"a",
-						   @"2", @"b",
-						   @"3", @"c",
-						   nil];
-	NSDictionary *dict2 = (id) [[dict1 PGTSKeyCollectD] uppercaseString];
-	MKCAssertEqualObjects (dict2, ([NSDictionary dictionaryWithObjectsAndKeys:
-									@"1", @"A",
-									@"2", @"B",
-									@"3", @"C",
-									nil]));	
-}
-
-
-static int
-SelectFunction (id object)
-{
-	int retval = 1;
-	if ([object isEqual: @"b"])
-		retval = 0;
-	return retval;
-}
-
-
-- (void) test24ArraySelectFunction
-{
-	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	MKCAssertEqualObjects ([array PGTSSelectFunction: &SelectFunction], ([NSArray arrayWithObjects: @"a", @"c", nil]));
-}
-
-
-- (void) test25SetSelectFunction
-{
-	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
-	MKCAssertEqualObjects ([set PGTSSelectFunction: &SelectFunction], ([NSSet setWithObjects: @"a", @"c", nil]));
-}
-
-
-- (void) test26ValueSelectFunction
-{
-	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-						  @"a", @"1",
-						  @"b", @"2",
-						  @"c", @"3",
-						  nil];
-	MKCAssertEqualObjects ([dict PGTSValueSelectFunction: &SelectFunction], ([NSArray arrayWithObjects: @"a", @"c", nil]));
-}
-
-
-static int
-SelectFunction2 (id object, void *arg)
-{
-	assert ([(id) arg isEqual: @"k"]);
-	
-	int retval = 1;
-	if ([object isEqual: @"b"])
-		retval = 0;
-	return retval;
-}
-
-
-- (void) test27ArraySelectFunction
-{
-	NSArray *array = [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
-	MKCAssertEqualObjects ([array PGTSSelectFunction: &SelectFunction2 argument: @"k"], ([NSArray arrayWithObjects: @"a", @"c", nil]));
-}
-
-
-- (void) test28SetSelectFunction
-{
-	NSSet *set = [NSSet setWithObjects: @"a", @"b", @"c", nil];
-	MKCAssertEqualObjects ([set PGTSSelectFunction: &SelectFunction2 argument: @"k"], ([NSSet setWithObjects: @"a", @"c", nil]));
-}
-
-
-- (void) test29ValueSelectFunction
-{
-	NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-						  @"a", @"1",
-						  @"b", @"2",
-						  @"c", @"3",
-						  nil];
-	MKCAssertEqualObjects ([dict PGTSValueSelectFunction: &SelectFunction2 argument: @"k"], ([NSArray arrayWithObjects: @"a", @"c", nil]));
-}
-@end

UnitTests/Sources/TestLoader.m

 #import "MKCSenTestCaseAdditions.h"
 
 #import "PGTSInvocationRecorderTests.h"
-#import "PGTSHOMTests.h"
+#import "BXHOMTests.h"
 #import "BXDelegateProxyTests.h"
 #import "NSPredicate+BaseTenAdditionsTests.h"
 #import "NSArray+BaseTenAdditionsTests.h"
 	
 	NSArray* testClasses = [NSArray arrayWithObjects:
 							[PGTSInvocationRecorderTests class],
-							[PGTSHOMTests class],
+							[BXHOMTests class],
 							[BXDelegateProxyTests class],
 							[NSPredicate_BaseTenAdditionsTests class],
 							[NSArray_BaseTenAdditionsTests class],

UnitTests/UnitTests.xcodeproj/project.pbxproj

 		53A59C560E3509CE0026D7E1 /* FetchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53BD965B0A5C1BA5001C950C /* FetchTests.m */; };
 		53BCC1D80F5EE90D00BD717A /* PGTSTypeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53BCC1D70F5EE90D00BD717A /* PGTSTypeTests.m */; };
 		53C4C544119376A5003FB842 /* BXDelegateProxyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C4C543119376A5003FB842 /* BXDelegateProxyTests.m */; };
-		53C4C55011937A1F003FB842 /* PGTSHOMTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C4C54F11937A1F003FB842 /* PGTSHOMTests.m */; };
+		53C4C55011937A1F003FB842 /* BXHOMTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C4C54F11937A1F003FB842 /* BXHOMTests.m */; };
 		53C4C61711943369003FB842 /* PGTSInvocationRecorderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C4C61611943369003FB842 /* PGTSInvocationRecorderTests.m */; };
 		53C4C61C119439BF003FB842 /* NSArray+BaseTenAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C4C61B119439BF003FB842 /* NSArray+BaseTenAdditionsTests.m */; };
 		53C4C62111943C8E003FB842 /* NSPredicate+BaseTenAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C4C62011943C8E003FB842 /* NSPredicate+BaseTenAdditionsTests.m */; };
 		53BD96BE0A5C2501001C950C /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = /System/Library/Frameworks/SenTestingKit.framework; sourceTree = "<absolute>"; };
 		53C4C542119376A5003FB842 /* BXDelegateProxyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BXDelegateProxyTests.h; path = Sources/BXDelegateProxyTests.h; sourceTree = "<group>"; };
 		53C4C543119376A5003FB842 /* BXDelegateProxyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BXDelegateProxyTests.m; path = Sources/BXDelegateProxyTests.m; sourceTree = "<group>"; };
-		53C4C54E11937A1F003FB842 /* PGTSHOMTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PGTSHOMTests.h; path = Sources/PGTSHOMTests.h; sourceTree = "<group>"; };
-		53C4C54F11937A1F003FB842 /* PGTSHOMTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PGTSHOMTests.m; path = Sources/PGTSHOMTests.m; sourceTree = "<group>"; };
+		53C4C54E11937A1F003FB842 /* BXHOMTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BXHOMTests.h; path = Sources/BXHOMTests.h; sourceTree = "<group>"; };
+		53C4C54F11937A1F003FB842 /* BXHOMTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BXHOMTests.m; path = Sources/BXHOMTests.m; sourceTree = "<group>"; };
 		53C4C61511943369003FB842 /* PGTSInvocationRecorderTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PGTSInvocationRecorderTests.h; path = Sources/PGTSInvocationRecorderTests.h; sourceTree = "<group>"; };
 		53C4C61611943369003FB842 /* PGTSInvocationRecorderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PGTSInvocationRecorderTests.m; path = Sources/PGTSInvocationRecorderTests.m; sourceTree = "<group>"; };
 		53C4C61A119439BF003FB842 /* NSArray+BaseTenAdditionsTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+BaseTenAdditionsTests.h"; path = "Sources/NSArray+BaseTenAdditionsTests.h"; sourceTree = "<group>"; };
 			children = (
 				53C4C61511943369003FB842 /* PGTSInvocationRecorderTests.h */,
 				53C4C61611943369003FB842 /* PGTSInvocationRecorderTests.m */,
-				53C4C54E11937A1F003FB842 /* PGTSHOMTests.h */,
-				53C4C54F11937A1F003FB842 /* PGTSHOMTests.m */,
+				53C4C54E11937A1F003FB842 /* BXHOMTests.h */,
+				53C4C54F11937A1F003FB842 /* BXHOMTests.m */,
 				53C4C542119376A5003FB842 /* BXDelegateProxyTests.h */,
 				53C4C543119376A5003FB842 /* BXDelegateProxyTests.m */,
 				53C4C61F11943C8E003FB842 /* NSPredicate+BaseTenAdditionsTests.h */,
 				53DA50F40FCC53960044C961 /* people-departments-no-inverse.xcdatamodel in Sources */,
 				3FC3D13211918C3D00D3CA68 /* PGTSPgBouncerTests.m in Sources */,
 				53C4C544119376A5003FB842 /* BXDelegateProxyTests.m in Sources */,
-				53C4C55011937A1F003FB842 /* PGTSHOMTests.m in Sources */,
+				53C4C55011937A1F003FB842 /* BXHOMTests.m in Sources */,
 				53C4C61711943369003FB842 /* PGTSInvocationRecorderTests.m in Sources */,
 				53C4C61C119439BF003FB842 /* NSArray+BaseTenAdditionsTests.m in Sources */,
 				53C4C62111943C8E003FB842 /* NSPredicate+BaseTenAdditionsTests.m in Sources */,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.