From 3f2c7213093f85ae1cfa1fb315305b2adb464610 Mon Sep 17 00:00:00 2001 From: "Alyssa.Yu" Date: Thu, 14 Sep 2023 15:11:40 -0700 Subject: [PATCH] fix: fix test --- Tests/IdentifyInterceptorTests.m | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Tests/IdentifyInterceptorTests.m b/Tests/IdentifyInterceptorTests.m index 655645ff..7cf544d5 100644 --- a/Tests/IdentifyInterceptorTests.m +++ b/Tests/IdentifyInterceptorTests.m @@ -80,7 +80,7 @@ - (void)testIdentifyWithOnlySetIsIntercepted { event = [self->_identifyInterceptor intercept:event]; - XCTAssertEqual(event, nil); + XCTAssertEqual([event count], 0); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); @@ -141,7 +141,7 @@ - (void)testInterceptedIdentifyIsTransferredOnNextActiveIdentify { event1 = [self->_identifyInterceptor intercept:event1]; - XCTAssertNil(event1); + XCTAssertEqual([event1 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 1); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -183,7 +183,7 @@ - (void)testMultipleInterceptedIdentifyIsTransferredOnNextActiveIdentify { event1 = [self->_identifyInterceptor intercept:event1]; - XCTAssertNil(event1); + XCTAssertEqual([event1 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 1); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -195,7 +195,7 @@ - (void)testMultipleInterceptedIdentifyIsTransferredOnNextActiveIdentify { event2 = [self->_identifyInterceptor intercept:event2]; - XCTAssertNil(event2); + XCTAssertEqual([event2 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 2); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 2); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -244,7 +244,7 @@ - (void)testMultipleInterceptedIdentifyIsTransferredOnNextActiveIdentifyWithSetO event1 = [self->_identifyInterceptor intercept:event1]; - XCTAssertNil(event1); + XCTAssertEqual([event1 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 1); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -256,7 +256,7 @@ - (void)testMultipleInterceptedIdentifyIsTransferredOnNextActiveIdentifyWithSetO event2 = [self->_identifyInterceptor intercept:event2]; - XCTAssertNil(event2); + XCTAssertEqual([event2 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 2); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 2); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -308,7 +308,7 @@ - (void)testInterceptedIdentifyIsTransferredOnNextActiveEvent { event = [self->_identifyInterceptor intercept:event]; - XCTAssertNil(event); + XCTAssertEqual([event count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 1); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -345,7 +345,7 @@ - (void)testMultipleInterceptedIdentifyIsTransferredNextActiveEvent { event1 = [self->_identifyInterceptor intercept:event1]; - XCTAssertNil(event1); + XCTAssertEqual([event1 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 1); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -357,7 +357,7 @@ - (void)testMultipleInterceptedIdentifyIsTransferredNextActiveEvent { event2 = [self->_identifyInterceptor intercept:event2]; - XCTAssertNil(event2); + XCTAssertEqual([event2 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 2); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 2); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -396,7 +396,7 @@ - (void)testNullValuesInIdentifySetAreIgnoredOnActiveIdentify { event1 = [self->_identifyInterceptor intercept:event1]; - XCTAssertNil(event1); + XCTAssertEqual([event1 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 1); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -409,7 +409,7 @@ - (void)testNullValuesInIdentifySetAreIgnoredOnActiveIdentify { event2 = [self->_identifyInterceptor intercept:event2]; - XCTAssertNil(event2); + XCTAssertEqual([event2 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 2); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 2); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -454,7 +454,7 @@ - (void)testNullValuesInIdentifySetAreIgnoredOnActiveEvent { event1 = [self->_identifyInterceptor intercept:event1]; - XCTAssertNil(event1); + XCTAssertEqual([event1 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 1); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 1); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0); @@ -467,7 +467,7 @@ - (void)testNullValuesInIdentifySetAreIgnoredOnActiveEvent { event2 = [self->_identifyInterceptor intercept:event2]; - XCTAssertNil(event2); + XCTAssertEqual([event2 count], 0); XCTAssertEqual(self->_dbHelper.getLastSequenceNumber, 2); XCTAssertEqual(self->_dbHelper.getInterceptedIdentifyCount, 2); XCTAssertEqual(self->_dbHelper.getIdentifyCount, 0);