File tree Expand file tree Collapse file tree
Tests/NetLensTests/UseCasesTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ //
2+ // NetworkCall.swift
3+ // NetLens
4+ //
5+ // Created by NetLens on 26/06/2025.
6+ //
7+
8+ import Testing
9+ @testable import NetLens
10+
11+ @Suite ( " Start Network interception use case " )
12+ struct StopNetworkInterceptionUseCaseTests {
13+
14+ private let mockInterceptor : MockNetworkInterceptor
15+
16+ private let stopNetworkInterceptionUseCase : StopNetworkInterceptionUseCase
17+
18+ init ( ) {
19+
20+ self . mockInterceptor = . init( )
21+
22+ stopNetworkInterceptionUseCase = StopNetworkInterceptionUseCaseImpl ( interceptor: mockInterceptor)
23+ }
24+
25+ @Test ( " Execute disable interception " )
26+ func executeDisableInterception( ) {
27+
28+ mockInterceptor. enable ( )
29+
30+ #expect( mockInterceptor. isEnabled == true )
31+
32+ stopNetworkInterceptionUseCase. execute ( )
33+
34+ #expect( mockInterceptor. isEnabled == false )
35+
36+ #expect( mockInterceptor. disableCallCount == 1 )
37+
38+
39+ }
40+ }
41+
You can’t perform that action at this time.
0 commit comments