-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add button to save logs on documents directory (#10)
- Loading branch information
1 parent
098db85
commit 0dc9d5b
Showing
6 changed files
with
112 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Copyright © Marc Schultz. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
@testable import Netbob | ||
|
||
class LogFileProviderMock: LogFileProviderProtocol { | ||
enum Calls: Equatable { | ||
case createFullLog | ||
case saveFullLog | ||
case createSingleLog(connection: HTTPConnection, includeBody: Bool) | ||
} | ||
|
||
var calls: [Calls] = [] | ||
|
||
var createFullLogReturnValue = URL(string: "http://fake.fake")! | ||
func createFullLog() throws -> URL { | ||
calls.append(.createFullLog) | ||
return createFullLogReturnValue | ||
} | ||
|
||
func saveFullLog() throws { | ||
calls.append(.saveFullLog) | ||
} | ||
|
||
var createSingleLogReturnValue = URL(string: "http://fake.fake")! | ||
func createSingleLog(from connection: HTTPConnection, includeBody: Bool) throws -> URL { | ||
calls.append(.createSingleLog(connection: connection, includeBody: includeBody)) | ||
return createSingleLogReturnValue | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters