Skip to content

Commit

Permalink
Merge pull request #1328 from BranchMetrics/SDK-2093-remove-OCMock
Browse files Browse the repository at this point in the history
SDK-2093 remove oc mock
  • Loading branch information
echo-branch authored Dec 14, 2023
2 parents 16bbc63 + bf6e9ee commit 18cc5aa
Show file tree
Hide file tree
Showing 44 changed files with 2,262 additions and 2,813 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
# This happens automatically with the unit_tests lane, but adding it here
# makes it easier to keep track of installation time via GHA without
# adding execution time to the next step.
- name: Install CocoaPods dependencies
run: bundle exec fastlane prepare_pods
#- name: Install CocoaPods dependencies
# run: bundle exec fastlane prepare_pods
- name: Run unit tests
run: bundle exec fastlane unit_tests
- name: Upload test results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@
// Copyright © 2018 Branch, Inc. All rights reserved.
//

#import "BNCTestCase.h"
#import <XCTest/XCTest.h>
#import "BNCApplication.h"
#import "BNCKeyChain.h"

@interface BNCApplicationTest : BNCTestCase
@interface BNCApplicationTests : XCTestCase
@end

@implementation BNCApplicationTest
@implementation BNCApplicationTests

- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

- (void)testApplication {
// Test general info:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2017 Branch Metrics. All rights reserved.
//

#import <XCTest/XCTest.h>
#import "BNCCrashlyticsWrapper.h"
#import "BNCTestCase.h"

#pragma mark Crashlytics SDK Stand-In

Expand Down Expand Up @@ -42,13 +42,20 @@ -(id)getCustomValueForKey:(NSString *)key {

#pragma mark - BNCCrashlyticsWrapperTest

@interface BNCCrashlyticsWrapperTest : BNCTestCase
@interface BNCCrashlyticsWrapperTests : XCTestCase
@end

@implementation BNCCrashlyticsWrapperTest
@implementation BNCCrashlyticsWrapperTests

- (void) testSetValue {
- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

- (void)testSetValue {
BNCCrashlyticsWrapper *wrapper = [BNCCrashlyticsWrapper wrapper];
NSString *value = @"TestString";
NSString *key = @"TestKey";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@

#import <XCTest/XCTest.h>
#import "BNCEncodingUtils.h"
#import "BNCTestCase.h"

@interface BNCEncodingUtilsTests : BNCTestCase
@interface BNCEncodingUtilsTests : XCTestCase
@end

@implementation BNCEncodingUtilsTests

- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

#pragma mark - EncodeDictionaryToJsonString tests

- (void)testEncodeDictionaryToJsonStringWithExpectedParams {
Expand Down
12 changes: 10 additions & 2 deletions Branch-TestBed/Branch-SDK-Tests/BNCLinkDataTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@
// Copyright (c) 2015 Branch Metrics. All rights reserved.
//

#import "BNCTestCase.h"
#import <XCTest/XCTest.h>
#import "BNCLinkData.h"

@interface BNCLinkDataTests : BNCTestCase
@interface BNCLinkDataTests : XCTestCase
@end

@implementation BNCLinkDataTests

- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

- (void)testBasicObjectHash {
BNCLinkData *a = [[BNCLinkData alloc] init];
BNCLinkData *b = [[BNCLinkData alloc] init];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
@file BNCLog.Test.m
@file BNCLogTests.m
@package BranchTests
@brief Tests for BNCLog.
Expand All @@ -10,22 +10,29 @@

#import <XCTest/XCTest.h>
#import "BNCLog.h"
#import "BNCTestCase.h"

@interface BNCLogTest : BNCTestCase
@interface BNCLogTests : XCTestCase
@end

@implementation BNCLogTest
@implementation BNCLogTests

- (void) testLogLevelString {
- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

- (void)testLogLevelString {
XCTAssertEqual(BNCLogLevelAll, BNCLogLevelFromString(@"BNCLogLevelAll"));
XCTAssertEqual(BNCLogLevelDebugSDK, BNCLogLevelFromString(@"BNCLogLevelDebugSDK"));
XCTAssertEqual(BNCLogLevelWarning, BNCLogLevelFromString(@"BNCLogLevelWarning"));
XCTAssertEqual(BNCLogLevelNone, BNCLogLevelFromString(@"BNCLogLevelNone"));
XCTAssertEqual(BNCLogLevelMax, BNCLogLevelFromString(@"BNCLogLevelMax"));
}

- (void) testLogLevelEnum {
- (void)testLogLevelEnum {
XCTAssertEqualObjects(@"BNCLogLevelAll", BNCLogStringFromLogLevel(BNCLogLevelAll));
XCTAssertEqualObjects(@"BNCLogLevelAll", BNCLogStringFromLogLevel(BNCLogLevelDebugSDK));
XCTAssertEqualObjects(@"BNCLogLevelWarning", BNCLogStringFromLogLevel(BNCLogLevelWarning));
Expand Down
Loading

0 comments on commit 18cc5aa

Please sign in to comment.