File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // Services+Testing.swift
3
+ // VaporTestTools
4
+ //
5
+ // Created by Ondrej Rafaj on 20/03/2018.
6
+ //
7
+
8
+ import Foundation
9
+ @testable import Service
10
+
11
+
12
+ extension TestableProperty where TestableType == Services {
13
+
14
+ public mutating func remove< S> ( type: S . Type ) {
15
+ if let existing = element. factories. index ( where: {
16
+ $0. serviceType is S . Type
17
+ } ) {
18
+ element. factories. remove ( at: existing)
19
+ }
20
+ }
21
+
22
+ }
23
+
24
+
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import Foundation
10
10
11
11
public struct TestableProperty < TestableType> {
12
12
13
- public let element : TestableType
13
+ public var element : TestableType
14
14
15
15
init ( _ obj: TestableType ) {
16
16
element = obj
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ extension Request: Testable { }
36
36
extension HTTPRequest : Testable { }
37
37
extension Response : Testable { }
38
38
extension Application : Testable { }
39
+ extension Services : Testable { }
39
40
40
41
41
42
extension Dictionary : Testable where Key == String , Value == String {
You can’t perform that action at this time.
0 commit comments