Skip to content

Commit

Permalink
Added deinitialization tests for NetworkReachabilityManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnoon committed Feb 8, 2016
1 parent d409ef6 commit 1ebdb63
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Tests/NetworkReachabilityManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,28 @@ class NetworkReachabilityManagerTestCase: BaseTestCase {
XCTAssertEqual(manager?.isReachableOnEthernetOrWiFi, true)
}

func testThatHostManagerCanBeDeinitialized() {
// Given
var manager: NetworkReachabilityManager? = NetworkReachabilityManager(host: "localhost")

// When
manager = nil

// Then
XCTAssertNil(manager)
}

func testThatAddressManagerCanBeDeinitialized() {
// Given
var manager: NetworkReachabilityManager? = NetworkReachabilityManager()

// When
manager = nil

// Then
XCTAssertNil(manager)
}

// MARK: - Tests - Listener

func testThatHostManagerIsNotifiedWhenStartListeningIsCalled() {
Expand Down

0 comments on commit 1ebdb63

Please sign in to comment.