Skip to content

Commit a2b83de

Browse files
authored
Merge pull request #127 from MojtabaHs/master
Fix spellings in the test files and documentation comments.
2 parents 609908e + 02fe5bb commit a2b83de

File tree

8 files changed

+25
-25
lines changed

8 files changed

+25
-25
lines changed

Sources/Resolver/Resolver.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public final class Resolver {
125125
return main.register(type, name: name, factory: factory)
126126
}
127127

128-
/// Static shortcut function used to register a specifc Service type and its instantiating factory method.
128+
/// Static shortcut function used to register a specific Service type and its instantiating factory method.
129129
///
130130
/// - parameter type: Type of Service being registered. Optional, may be inferred by factory result type.
131131
/// - parameter name: Named variant of Service being registered.
@@ -139,7 +139,7 @@ public final class Resolver {
139139
return main.register(type, name: name, factory: factory)
140140
}
141141

142-
/// Static shortcut function used to register a specifc Service type and its instantiating factory method with multiple argument support.
142+
/// Static shortcut function used to register a specific Service type and its instantiating factory method with multiple argument support.
143143
///
144144
/// - parameter type: Type of Service being registered. Optional, may be inferred by factory result type.
145145
/// - parameter name: Named variant of Service being registered.
@@ -153,7 +153,7 @@ public final class Resolver {
153153
return main.register(type, name: name, factory: factory)
154154
}
155155

156-
/// Registers a specifc Service type and its instantiating factory method.
156+
/// Registers a specific Service type and its instantiating factory method.
157157
///
158158
/// - parameter type: Type of Service being registered. Optional, may be inferred by factory result type.
159159
/// - parameter name: Named variant of Service being registered.
@@ -173,7 +173,7 @@ public final class Resolver {
173173
return ResolverOptions(registration: registration)
174174
}
175175

176-
/// Registers a specifc Service type and its instantiating factory method.
176+
/// Registers a specific Service type and its instantiating factory method.
177177
///
178178
/// - parameter type: Type of Service being registered. Optional, may be inferred by factory result type.
179179
/// - parameter name: Named variant of Service being registered.
@@ -193,7 +193,7 @@ public final class Resolver {
193193
return ResolverOptions(registration: registration)
194194
}
195195

196-
/// Registers a specifc Service type and its instantiating factory method with multiple argument support.
196+
/// Registers a specific Service type and its instantiating factory method with multiple argument support.
197197
///
198198
/// - parameter type: Type of Service being registered. Optional, may be inferred by factory result type.
199199
/// - parameter name: Named variant of Service being registered.
@@ -444,7 +444,7 @@ public typealias ResolverFactoryAnyArguments<Service> = (_ resolver: Resolver, _
444444
public typealias ResolverFactoryMutator<Service> = (_ resolver: Resolver, _ service: Service) -> Void
445445
public typealias ResolverFactoryMutatorArgumentsN<Service> = (_ resolver: Resolver, _ service: Service, _ args: Resolver.Args) -> Void
446446

447-
/// A ResolverOptions instance is returned by a registration function in order to allow additonal configuratiom. (e.g. scopes, etc.)
447+
/// A ResolverOptions instance is returned by a registration function in order to allow additional configuration. (e.g. scopes, etc.)
448448
public struct ResolverOptions<Service> {
449449

450450
// MARK: - Parameters

Tests/ResolverTests/ResolverBasicTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ResolverBasicTests: XCTestCase {
5353
XCTAssertNotNil(service?.session)
5454
}
5555

56-
func testRegistrationOverwritting() {
56+
func testRegistrationOverwriting() {
5757
resolver.register() { XYZNameService("Fred") }
5858
resolver.register() { XYZNameService("Barney") }
5959
let service: XYZNameService? = resolver.optional()

Tests/ResolverTests/ResolverClassTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ResolverClassTests: XCTestCase {
2626
XCTAssertNotNil(session)
2727
}
2828

29-
func testRegistrationAndInferedResolution() {
29+
func testRegistrationAndInferredResolution() {
3030
let session: XYZSessionService? = Resolver.resolve() as XYZSessionService
3131
XCTAssertNotNil(session)
3232
}

Tests/ResolverTests/ResolverContainerTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class ResolverContainerTests: XCTestCase {
124124
resolver2 = Resolver(parent: resolver1)
125125

126126
resolver1.register() { XYZNameService("Unnamed service") }
127-
resolver1.register(name: "Name") { XYZNameService("Overriden named service") }
127+
resolver1.register(name: "Name") { XYZNameService("Overridden named service") }
128128
resolver2.register(name: "Name") { XYZNameService("Resolved named service") }
129129

130130
// should find in resolver in which it was defined
@@ -134,7 +134,7 @@ class ResolverContainerTests: XCTestCase {
134134

135135
let r1Named: XYZNameService? = resolver1.optional(name: "Name")
136136
XCTAssertNotNil(r1Named)
137-
XCTAssert(r1Named?.name == "Overriden named service")
137+
XCTAssert(r1Named?.name == "Overridden named service")
138138

139139
// should resolve from child container
140140
let r2: XYZNameService? = resolver2.optional()

Tests/ResolverTests/ResolverInjectedTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,18 @@ class OptionalInjectedViewController {
5555
@OptionalInjected var notRegistered: NotRegistered?
5656
}
5757

58-
protocol ReturnsSomthing: AnyObject {
58+
protocol ReturnsSomething: AnyObject {
5959
func returnSomething() -> Bool
6060
}
6161

62-
class WeakXYZService: XYZService, ReturnsSomthing {
62+
class WeakXYZService: XYZService, ReturnsSomething {
6363
func returnSomething() -> Bool {
6464
return true
6565
}
6666
}
6767

6868
class WeakLazyInjectedProtocolViewController {
69-
@WeakLazyInjected var service: ReturnsSomthing?
69+
@WeakLazyInjected var service: ReturnsSomething?
7070
}
7171

7272
class NotRegistered {
@@ -78,7 +78,7 @@ class ResolverInjectedTests: XCTestCase {
7878
super.setUp()
7979

8080
Resolver.main.register { WeakXYZService(nil) }
81-
.implements(ReturnsSomthing.self)
81+
.implements(ReturnsSomething.self)
8282
.scope(.shared)
8383

8484
Resolver.main.register { XYZSessionService() }

Tests/ResolverTests/ResolverNameTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class ResolverNameTests: XCTestCase {
145145
let host2 = "https://www.google.com"
146146
}
147147

148-
func testResolverNamedStringRegististrations() {
148+
func testResolverNamedStringRegistrations() {
149149

150150
Task.init {
151151

Tests/ResolverTests/ResolverProtocolTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ResolverProtocolTests: XCTestCase {
2929
XCTAssert(service?.name == "XYZCombinedService")
3030
}
3131

32-
func testProtocolWithInferedResolution() {
32+
func testProtocolWithInferredResolution() {
3333
resolver.register { XYZCombinedService() as XYZFetching }
3434
let service: XYZFetching? = resolver.resolve() as XYZFetching
3535
XCTAssertNotNil(service)
@@ -43,7 +43,7 @@ class ResolverProtocolTests: XCTestCase {
4343
XCTAssert(service?.name == "XYZCombinedService")
4444
}
4545

46-
func testMultipeProtocolsWithOptionalResolution() {
46+
func testMultipleProtocolsWithOptionalResolution() {
4747
resolver.register { XYZCombinedService() as XYZFetching }
4848
resolver.register { XYZCombinedService() as XYZUpdating }
4949

@@ -56,7 +56,7 @@ class ResolverProtocolTests: XCTestCase {
5656
XCTAssert(updater?.name == "XYZCombinedService")
5757
}
5858

59-
func testMultipeProtocolsWithForwarding() {
59+
func testMultipleProtocolsWithForwarding() {
6060
resolver.register { self.resolver.resolve() as XYZCombinedService as XYZFetching }
6161
resolver.register { self.resolver.resolve() as XYZCombinedService as XYZUpdating }
6262
resolver.register { XYZCombinedService() }
@@ -74,7 +74,7 @@ class ResolverProtocolTests: XCTestCase {
7474
XCTAssert(updater?.name == "XYZCombinedService")
7575
}
7676

77-
func testMultipeProtocolsWithImplements() {
77+
func testMultipleProtocolsWithImplements() {
7878
resolver.register { XYZCombinedService() }
7979
.implements(XYZFetching.self)
8080
.implements(XYZUpdating.self)

Tests/ResolverTests/XCTestManifests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extension ResolverClassTests {
4747
// to regenerate.
4848
static let __allTests__ResolverClassTests = [
4949
("testRegistrationAndExplicitResolution", testRegistrationAndExplicitResolution),
50-
("testRegistrationAndInferedResolution", testRegistrationAndInferedResolution),
50+
("testRegistrationAndInferredResolution", testRegistrationAndInferredResolution),
5151
("testRegistrationAndOptionalResolution", testRegistrationAndOptionalResolution),
5252
("testRegistrationAndOptionalResolutionFailure", testRegistrationAndOptionalResolutionFailure),
5353
("testRegistrationAndPassedResolver", testRegistrationAndPassedResolver),
@@ -56,7 +56,7 @@ extension ResolverClassTests {
5656
("testRegistrationAndResolutionProperties", testRegistrationAndResolutionProperties),
5757
("testRegistrationAndResolutionResolve", testRegistrationAndResolutionResolve),
5858
("testRegistrationAndResolutionResolveArgs", testRegistrationAndResolutionResolveArgs),
59-
("testRegistrationOverwritting", testRegistrationOverwritting),
59+
("testRegistrationOverwriting", testRegistrationOverwriting),
6060
]
6161
}
6262

@@ -122,11 +122,11 @@ extension ResolverProtocolTests {
122122
// `swift test --generate-linuxmain`
123123
// to regenerate.
124124
static let __allTests__ResolverProtocolTests = [
125-
("testMultipeProtocolsWithForwarding", testMultipeProtocolsWithForwarding),
126-
("testMultipeProtocolsWithImplements", testMultipeProtocolsWithImplements),
127-
("testMultipeProtocolsWithOptionalResolution", testMultipeProtocolsWithOptionalResolution),
125+
("testMultipleProtocolsWithForwarding", testMultipleProtocolsWithForwarding),
126+
("testMultipleProtocolsWithImplements", testMultipleProtocolsWithImplements),
127+
("testMultipleProtocolsWithOptionalResolution", testMultipleProtocolsWithOptionalResolution),
128128
("testProtocolWithExplicitResolution", testProtocolWithExplicitResolution),
129-
("testProtocolWithInferedResolution", testProtocolWithInferedResolution),
129+
("testProtocolWithInferredResolution", testProtocolWithInferredResolution),
130130
("testProtocolWithOptionalResolution", testProtocolWithOptionalResolution),
131131
("testScopeSharedProtocols", testScopeSharedProtocols),
132132
]

0 commit comments

Comments
 (0)