mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 04:05:20 +00:00
Refactor Noise: Extract files and remove dead code (#806)
* Extract each type to a separate file * NoiseSessionManager: Remove unused functions --------- Co-authored-by: jack <212554440+jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -166,14 +166,14 @@ final class NoiseProtocolTests: XCTestCase {
|
||||
func testSessionManagerBasicOperations() throws {
|
||||
let manager = NoiseSessionManager(localStaticKey: aliceKey, keychain: mockKeychain)
|
||||
|
||||
// Create session
|
||||
let session = manager.createSession(for: TestConstants.testPeerID2, role: .initiator)
|
||||
XCTAssertNotNil(session)
|
||||
XCTAssertNil(manager.getSession(for: TestConstants.testPeerID2))
|
||||
|
||||
_ = try manager.initiateHandshake(with: TestConstants.testPeerID2)
|
||||
XCTAssertNotNil(manager.getSession(for: TestConstants.testPeerID2))
|
||||
|
||||
// Get session
|
||||
let retrieved = manager.getSession(for: TestConstants.testPeerID2)
|
||||
XCTAssertNotNil(retrieved)
|
||||
XCTAssertTrue(session === retrieved)
|
||||
|
||||
// Remove session
|
||||
manager.removeSession(for: TestConstants.testPeerID2)
|
||||
|
||||
Reference in New Issue
Block a user