PsiphonTunnelTests.m 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // PsiphonTunnelTests.m
  3. // PsiphonTunnelTests
  4. //
  5. // Created by Adam Pritchard on 2016-10-06.
  6. // Copyright © 2016 Psiphon Inc. All rights reserved.
  7. //
  8. #import <XCTest/XCTest.h>
  9. #import "PsiphonTunnel.h"
  10. @interface PsiphonTunnelDelegate : NSObject <TunneledAppDelegate>
  11. @end
  12. @implementation PsiphonTunnelDelegate
  13. - (NSString * _Nullable)getPsiphonConfig {
  14. return @"";
  15. }
  16. @end
  17. @interface PsiphonTunnelTests : XCTestCase
  18. @property PsiphonTunnelDelegate *psiphonTunnelDelegate;
  19. @end
  20. @implementation PsiphonTunnelTests
  21. - (void)setUp {
  22. [super setUp];
  23. // Put setup code here. This method is called before the invocation of each test method in the class.
  24. self.psiphonTunnelDelegate = [[PsiphonTunnelDelegate alloc] init];
  25. }
  26. - (void)tearDown {
  27. // Put teardown code here. This method is called after the invocation of each test method in the class.
  28. [super tearDown];
  29. }
  30. - (void)testExample {
  31. // This is an example of a functional test case.
  32. // Use XCTAssert and related functions to verify your tests produce the correct results.
  33. PsiphonTunnel *tunnel = [PsiphonTunnel newPsiphonTunnel:self.psiphonTunnelDelegate];
  34. XCTAssertNotNil(tunnel);
  35. }
  36. - (void)testPerformanceExample {
  37. // This is an example of a performance test case.
  38. [self measureBlock:^{
  39. // Put the code you want to measure the time of here.
  40. }];
  41. }
  42. @end