Skip to content

Commit

Permalink
Update Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
k-lpmg committed Aug 3, 2018
1 parent 85b7b74 commit 6995ae1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/RealmTransactionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class RealmTransactionTests: XCTestCase {
override func setUp() {
super.setUp()

UserRealmManager.shared.clear()
UserRealmManager().clear()
}

func testDefaultTransaction() {
UserRealmManager.shared.transaction(writeHandler: { (realm) in
UserRealmManager().transaction(writeHandler: { (realm) in
self.addUser(count: self.userCount, realm: realm)

let users = realm.objects(User.self)
Expand All @@ -24,7 +24,7 @@ class RealmTransactionTests: XCTestCase {
func testDefaultAsyncTransaction() {
let expectation = self.expectation(description: "testCreateNotification")

UserRealmManager.shared.transaction(isSync: false, writeHandler: { (realm) in
UserRealmManager().transaction(isSync: false, writeHandler: { (realm) in
self.addUser(count: self.userCount, realm: realm)
}) { (realm, error) in
XCTAssertNil(error)
Expand All @@ -40,7 +40,7 @@ class RealmTransactionTests: XCTestCase {
}

func testCustomSyncTransaction() {
UserRealmManager.shared.transaction(writeQueue: DispatchQueue(label: "testCustomSyncTransaction"), writeHandler: { (realm) in
UserRealmManager().transaction(writeQueue: DispatchQueue(label: "testCustomSyncTransaction"), writeHandler: { (realm) in
self.addUser(count: self.userCount, realm: realm)

let users = realm.objects(User.self)
Expand All @@ -51,7 +51,7 @@ class RealmTransactionTests: XCTestCase {
func testCustomAsyncTransaction() {
let expectation = self.expectation(description: "testCreateNotification")

UserRealmManager.shared.transaction(writeQueue: DispatchQueue(label: "testCustomAsyncTransaction"), isSync: false, writeHandler: { (realm) in
UserRealmManager().transaction(writeQueue: DispatchQueue(label: "testCustomAsyncTransaction"), isSync: false, writeHandler: { (realm) in
self.addUser(count: self.userCount, realm: realm)
}) { (realm, error) in
XCTAssertNil(error)
Expand Down

0 comments on commit 6995ae1

Please sign in to comment.