incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [6/7] ios commit: Remove unit test header files and simplify CDVWebViewTest.
Date Mon, 09 Jul 2012 22:40:20 GMT
Remove unit test header files and simplify CDVWebViewTest.

Unit tests are isolated, so there is no need to export their information
in headers. Removing them simplifies things a bit.

CDVWebViewTest was using reflection unnecessarily. Simplified it with
direct selectors.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/a32c7cc1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/a32c7cc1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/a32c7cc1

Branch: refs/heads/master
Commit: a32c7cc165f1e1c3da666890dba65d2fe9b12df7
Parents: 4d4bc36
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Jul 5 12:13:27 2012 -0400
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Jul 9 14:31:34 2012 -0700

----------------------------------------------------------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj    |   16 +------
 CordovaLib/CordovaLibTests/CDVBase64Tests.h        |   26 ------------
 CordovaLib/CordovaLibTests/CDVBase64Tests.m        |    6 ++-
 CordovaLib/CordovaLibTests/CDVContactsTests.h      |   31 ---------------
 CordovaLib/CordovaLibTests/CDVContactsTests.m      |    8 +++-
 CordovaLib/CordovaLibTests/CDVLocalStorageTests.h  |   26 ------------
 CordovaLib/CordovaLibTests/CDVLocalStorageTests.m  |    6 ++-
 .../CDVPluginResultJSONSerializationTests.h        |   28 -------------
 .../CDVPluginResultJSONSerializationTests.m        |    6 ++-
 CordovaLib/CordovaLibTests/CDVWebViewTest.h        |    3 +
 CordovaLib/CordovaLibTests/CDVWebViewTest.m        |   26 ++++--------
 CordovaLib/CordovaLibTests/CDVWhitelistTests.h     |   26 ------------
 CordovaLib/CordovaLibTests/CDVWhitelistTests.m     |    6 ++-
 13 files changed, 42 insertions(+), 172 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 38f9614..8f149e0 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -221,7 +221,6 @@
 		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType
= text; path = VERSION; sourceTree = "<group>"; };
 		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h;
sourceTree = "<group>"; };
 		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m;
sourceTree = "<group>"; };
-		30356212141049E1006C2D43 /* CDVWhitelistTests.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; path = CDVWhitelistTests.h; sourceTree = "<group>";
};
 		30356213141049E1006C2D43 /* CDVWhitelistTests.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; path = CDVWhitelistTests.m; sourceTree = "<group>";
};
 		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h;
sourceTree = "<group>"; };
 		303A4068152124BB00182201 /* CordovaLibApp.app */ = {isa = PBXFileReference; explicitFileType
= wrapper.application; includeInIndex = 0; path = CordovaLibApp.app; sourceTree = BUILT_PRODUCTS_DIR;
};
@@ -235,7 +234,6 @@
 		303A407A152124BB00182201 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType
= sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h";
sourceTree = "<group>"; };
 		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m";
sourceTree = "<group>"; };
-		3062D1AC151D4D9D000D9128 /* CDVLocalStorageTests.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; path = CDVLocalStorageTests.h; sourceTree = "<group>";
};
 		3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; path = CDVLocalStorageTests.m; sourceTree = "<group>";
};
 		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h;
sourceTree = "<group>"; };
 		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m;
sourceTree = "<group>"; };
@@ -243,9 +241,7 @@
 		30956FD1138F1F5600FC3563 /* CDVMotion.m */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.objc; name = CDVMotion.m; path = Classes/CDVMotion.m; sourceTree
= "<group>"; };
 		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType
= sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
 		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType
= sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
-		30AE4E8B1419532F005A9C9A /* CDVContactsTests.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; path = CDVContactsTests.h; sourceTree = "<group>";
};
 		30AE4E8C1419532F005A9C9A /* CDVContactsTests.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; path = CDVContactsTests.m; sourceTree = "<group>";
};
-		30B342F315224B360070E6A5 /* CDVWebViewTest.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewTest.h; sourceTree = "<group>";
};
 		30B342F415224B360070E6A5 /* CDVWebViewTest.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewTest.m; sourceTree = "<group>";
};
 		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h;
sourceTree = "<group>"; };
 		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m;
sourceTree = "<group>"; };
@@ -253,7 +249,6 @@
 		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m;
sourceTree = "<group>"; };
 		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h;
sourceTree = "<group>"; };
 		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m;
sourceTree = "<group>"; };
-		30D1B08A15A2B36D0060C291 /* CDVBase64Tests.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; path = CDVBase64Tests.h; sourceTree = "<group>";
};
 		30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; path = CDVBase64Tests.m; sourceTree = "<group>";
};
 		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree
= "<group>"; };
 		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree
= "<group>"; };
@@ -271,7 +266,6 @@
 		686357B2141002F200DF4CF2 /* CordovaLibTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType
= text.plist.xml; path = "CordovaLibTests-Info.plist"; sourceTree = "<group>"; };
 		686357B4141002F200DF4CF2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings;
name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		686357B6141002F200DF4CF2 /* CordovaLibTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType
= sourcecode.c.h; path = "CordovaLibTests-Prefix.pch"; sourceTree = "<group>"; };
-		686357B7141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.h */ = {isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h; path = CDVPluginResultJSONSerializationTests.h; sourceTree
= "<group>"; };
 		686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */ = {isa = PBXFileReference;
lastKnownFileType = sourcecode.c.objc; path = CDVPluginResultJSONSerializationTests.m; sourceTree
= "<group>"; };
 		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType
= wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework;
sourceTree = SDKROOT; };
 		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType
= wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework;
sourceTree = SDKROOT; };
@@ -313,6 +307,7 @@
 		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT;
};
 		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h;
sourceTree = "<group>"; };
 		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m;
sourceTree = "<group>"; };
+		EBA3550F15A5F18900F4DE24 /* CDVWebViewTest.h */ = {isa = PBXFileReference; lastKnownFileType
= sourcecode.c.h; path = CDVWebViewTest.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -460,17 +455,12 @@
 		686357B0141002F100DF4CF2 /* CordovaLibTests */ = {
 			isa = PBXGroup;
 			children = (
-				30D1B08A15A2B36D0060C291 /* CDVBase64Tests.h */,
-				30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */,
-				30B342F315224B360070E6A5 /* CDVWebViewTest.h */,
+				EBA3550F15A5F18900F4DE24 /* CDVWebViewTest.h */,
 				30B342F415224B360070E6A5 /* CDVWebViewTest.m */,
-				3062D1AC151D4D9D000D9128 /* CDVLocalStorageTests.h */,
+				30D1B08B15A2B36D0060C291 /* CDVBase64Tests.m */,
 				3062D1AD151D4D9D000D9128 /* CDVLocalStorageTests.m */,
-				686357B7141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.h */,
 				686357B9141002F200DF4CF2 /* CDVPluginResultJSONSerializationTests.m */,
-				30356212141049E1006C2D43 /* CDVWhitelistTests.h */,
 				30356213141049E1006C2D43 /* CDVWhitelistTests.m */,
-				30AE4E8B1419532F005A9C9A /* CDVContactsTests.h */,
 				30AE4E8C1419532F005A9C9A /* CDVContactsTests.m */,
 				686357B1141002F200DF4CF2 /* Supporting Files */,
 			);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVBase64Tests.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVBase64Tests.h b/CordovaLib/CordovaLibTests/CDVBase64Tests.h
deleted file mode 100644
index ae6f9be..0000000
--- a/CordovaLib/CordovaLibTests/CDVBase64Tests.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <SenTestingKit/SenTestingKit.h>
-
-@interface CDVBase64Tests : SenTestCase {
-
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVBase64Tests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVBase64Tests.m b/CordovaLib/CordovaLibTests/CDVBase64Tests.m
index bd3e68e..e7ccf1a 100644
--- a/CordovaLib/CordovaLibTests/CDVBase64Tests.m
+++ b/CordovaLib/CordovaLibTests/CDVBase64Tests.m
@@ -17,9 +17,13 @@
  under the License.
  */
 
-#import "CDVBase64Tests.h"
+#import <SenTestingKit/SenTestingKit.h>
+
 #import "NSData+Base64.h"
 
+@interface CDVBase64Tests : SenTestCase
+@end
+
 @implementation CDVBase64Tests
 
 - (void)setUp

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVContactsTests.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVContactsTests.h b/CordovaLib/CordovaLibTests/CDVContactsTests.h
deleted file mode 100644
index ddd1cb6..0000000
--- a/CordovaLib/CordovaLibTests/CDVContactsTests.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <SenTestingKit/SenTestingKit.h>
-#import "CDVWebViewTest.h"
-
-@class CDVContacts;
-
-@interface CDVContactsTests : CDVWebViewTest {
-	
-}
-
-@property (nonatomic, retain) CDVContacts* contacts;
-
-@end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVContactsTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVContactsTests.m b/CordovaLib/CordovaLibTests/CDVContactsTests.m
index efa8493..c921e8b 100644
--- a/CordovaLib/CordovaLibTests/CDVContactsTests.m
+++ b/CordovaLib/CordovaLibTests/CDVContactsTests.m
@@ -17,9 +17,15 @@
  under the License.
  */
 
-#import "CDVContactsTests.h"
+#import <SenTestingKit/SenTestingKit.h>
+
+#import "CDVWebViewTest.h"
 #import "CDVContacts.h"
 
+@interface CDVContactsTests : CDVWebViewTest
+@property (nonatomic, retain) CDVContacts* contacts;
+@end
+
 @implementation CDVContactsTests
 
 @synthesize webView, contacts;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVLocalStorageTests.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVLocalStorageTests.h b/CordovaLib/CordovaLibTests/CDVLocalStorageTests.h
deleted file mode 100644
index c2ae7b9..0000000
--- a/CordovaLib/CordovaLibTests/CDVLocalStorageTests.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <SenTestingKit/SenTestingKit.h>
-
-@interface CDVLocalStorageTests : SenTestCase {
-
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m b/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
index 77ee28c..09a767d 100644
--- a/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
+++ b/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
@@ -17,9 +17,13 @@
  under the License.
  */
 
-#import "CDVLocalStorageTests.h"
+#import <SenTestingKit/SenTestingKit.h>
+
 #import "CDVLocalStorage.h"
 
+@interface CDVLocalStorageTests : SenTestCase
+@end
+
 @implementation CDVLocalStorageTests
 
 - (void)setUp

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.h b/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.h
deleted file mode 100644
index 8f49767..0000000
--- a/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <SenTestingKit/SenTestingKit.h>
-
-
-@interface CDVPluginResultJSONSerializationTests : SenTestCase {
-@private
-    
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m b/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
index 236e92e..5aad0ea 100644
--- a/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
+++ b/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
@@ -18,10 +18,14 @@
  */
 
 #import <Foundation/Foundation.h>
-#import "CDVPluginResultJSONSerializationTests.h"
+#import <SenTestingKit/SenTestingKit.h>
+
 #import "CDVPluginResult.h"
 #import "JSONKit.h"
 
+@interface CDVPluginResultJSONSerializationTests : SenTestCase
+@end
+
 @implementation CDVPluginResultJSONSerializationTests
 
 - (void)testSerializingMessageAsInt {

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVWebViewTest.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVWebViewTest.h b/CordovaLib/CordovaLibTests/CDVWebViewTest.h
index d5652c2..f1868e1 100644
--- a/CordovaLib/CordovaLibTests/CDVWebViewTest.h
+++ b/CordovaLib/CordovaLibTests/CDVWebViewTest.h
@@ -19,10 +19,13 @@
 
 #import <SenTestingKit/SenTestingKit.h>
 
+@class CDVViewController;
+
 @interface CDVWebViewTest : SenTestCase {
 	
 }
 
+@property (nonatomic, retain) CDVViewController* viewController;
 @property (nonatomic, retain) UIWebView* webView;
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVWebViewTest.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVWebViewTest.m b/CordovaLib/CordovaLibTests/CDVWebViewTest.m
index 194985b..f505e19 100644
--- a/CordovaLib/CordovaLibTests/CDVWebViewTest.m
+++ b/CordovaLib/CordovaLibTests/CDVWebViewTest.m
@@ -18,27 +18,24 @@
  */
 
 #import "CDVWebViewTest.h"
-#import "CDVViewController.h"
+
+#import "AppDelegate.h"
+#import "ViewController.h"
 
 @implementation CDVWebViewTest
 
-@synthesize webView;
+@synthesize viewController = _viewController;
+@synthesize webView = _webView;
 
 - (void)setUp
 {
     [super setUp];
     
     // setup code here
-    id<UIApplicationDelegate> delegate = [[UIApplication sharedApplication] delegate];
-    if ([delegate respondsToSelector:@selector(viewController)]) {
-        id vc = [delegate performSelector:@selector(viewController)];
-        if ([vc respondsToSelector:@selector(webView)]) {
-            id wv = [vc webView];
-            if ([wv isKindOfClass:[UIWebView class]]) {
-                self.webView = wv;
-            }
-        }
-    }
+    AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
+    self.viewController = delegate.viewController;
+    self.webView = self.viewController.webView;
+    STAssertTrue(self.webView != nil, @"The test application's webView is not accessible.
The webView is required by the test.");
 }
 
 - (void)tearDown
@@ -49,9 +46,4 @@
 	self.webView = nil;
 }
 
-- (void) testWebViewAvailable
-{
-	STAssertTrue(self.webView != nil, @"The test application's webView is not accessible. The
webView is required by the test.");
-}
-
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVWhitelistTests.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVWhitelistTests.h b/CordovaLib/CordovaLibTests/CDVWhitelistTests.h
deleted file mode 100644
index db2a85e..0000000
--- a/CordovaLib/CordovaLibTests/CDVWhitelistTests.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <SenTestingKit/SenTestingKit.h>
-
-@interface CDVWhitelistTests : SenTestCase {
-
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/a32c7cc1/CordovaLib/CordovaLibTests/CDVWhitelistTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVWhitelistTests.m b/CordovaLib/CordovaLibTests/CDVWhitelistTests.m
index 55d8378..d2c784e 100644
--- a/CordovaLib/CordovaLibTests/CDVWhitelistTests.m
+++ b/CordovaLib/CordovaLibTests/CDVWhitelistTests.m
@@ -17,9 +17,13 @@
  under the License.
  */
 
-#import "CDVWhitelistTests.h"
+#import <SenTestingKit/SenTestingKit.h>
+
 #import "CDVWhitelist.h"
 
+@interface CDVWhitelistTests : SenTestCase
+@end
+
 @implementation CDVWhitelistTests
 
 - (void)setUp


Mime
View raw message