Skip to content

Commit

Permalink
Correct assumption language in DependentAs... tests
Browse files Browse the repository at this point in the history
Reviewed By: joesus

Differential Revision: D36926084

fbshipit-source-id: 4819fec08d9e06c1726767d17928e767de49e492
  • Loading branch information
samodom authored and facebook-github-bot committed Jun 6, 2022
1 parent 89d056c commit cdb34d9
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 54 deletions.
16 changes: 7 additions & 9 deletions FBAEMKit/FBAEMKitTests/DependentAsTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,24 @@ private enum CustomImplementationDependent: DependentAsType {

fileprivate extension String {
static let missingDependencies = """
Attempting to get the missing dependencies of a dependent should throw a missing type dependencies error
Attempting to get the missing dependencies of a dependent throws a missing type dependencies error
"""
static let defaultDependencies = """
If a dependent's configured dependencies are missing, its default dependencies should be provided
"""
static let customDependencies = """
If a dependent has configured dependencies, those dependencies should be provided
When a dependent's configured dependencies are missing, its default dependencies are provided
"""
static let customDependencies = "When a dependent has configured dependencies, those dependencies are provided"

static let defaultSetDependenciesImplementation = """
A dependent should have a default `setDependencies(_:)` implementation that sets its configured dependencies
A dependent has a default `setDependencies(_:)` implementation that sets its configured dependencies
"""
static let customSetDependenciesImplementation = """
A dependent should be able to override the default `setDependencies(_:)` implementation
A dependent can override the default `setDependencies(_:)` implementation
"""

static let defaultResetDependenciesImplementation = """
A dependent should have a default `resetDependencies()` implementation that clears its configured dependencies
A dependent has a default `resetDependencies()` implementation that clears its configured dependencies
"""
static let customResetDependenciesImplementation = """
A dependent should be able to override the default `resetDependencies()` implementation
A dependent can override the default `resetDependencies()` implementation
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,24 @@ private enum CustomImplementationDependent: DependentAsType {

fileprivate extension String {
static let missingDependencies = """
Attempting to get the missing dependencies of a dependent should throw a missing type dependencies error
Attempting to get the missing dependencies of a dependent throws a missing type dependencies error
"""
static let defaultDependencies = """
If a dependent's configured dependencies are missing, its default dependencies should be provided
"""
static let customDependencies = """
If a dependent has configured dependencies, those dependencies should be provided
When a dependent's configured dependencies are missing, its default dependencies are provided
"""
static let customDependencies = "When a dependent has configured dependencies, those dependencies are provided"

static let defaultSetDependenciesImplementation = """
A dependent should have a default `setDependencies(_:)` implementation that sets its configured dependencies
A dependent has a default `setDependencies(_:)` implementation that sets its configured dependencies
"""
static let customSetDependenciesImplementation = """
A dependent should be able to override the default `setDependencies(_:)` implementation
A dependent can override the default `setDependencies(_:)` implementation
"""

static let defaultResetDependenciesImplementation = """
A dependent should have a default `resetDependencies()` implementation that clears its configured dependencies
A dependent has a default `resetDependencies()` implementation that clears its configured dependencies
"""
static let customResetDependenciesImplementation = """
A dependent should be able to override the default `resetDependencies()` implementation
A dependent can override the default `resetDependencies()` implementation
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,24 @@ private enum CustomImplementationDependent: DependentAsType {

fileprivate extension String {
static let missingDependencies = """
Attempting to get the missing dependencies of a dependent should throw a missing type dependencies error
Attempting to get the missing dependencies of a dependent throws a missing type dependencies error
"""
static let defaultDependencies = """
If a dependent's configured dependencies are missing, its default dependencies should be provided
"""
static let customDependencies = """
If a dependent has configured dependencies, those dependencies should be provided
When a dependent's configured dependencies are missing, its default dependencies are provided
"""
static let customDependencies = "When a dependent has configured dependencies, those dependencies are provided"

static let defaultSetDependenciesImplementation = """
A dependent should have a default `setDependencies(_:)` implementation that sets its configured dependencies
A dependent has a default `setDependencies(_:)` implementation that sets its configured dependencies
"""
static let customSetDependenciesImplementation = """
A dependent should be able to override the default `setDependencies(_:)` implementation
A dependent can override the default `setDependencies(_:)` implementation
"""

static let defaultResetDependenciesImplementation = """
A dependent should have a default `resetDependencies()` implementation that clears its configured dependencies
A dependent has a default `resetDependencies()` implementation that clears its configured dependencies
"""
static let customResetDependenciesImplementation = """
A dependent should be able to override the default `resetDependencies()` implementation
A dependent can override the default `resetDependencies()` implementation
"""
}
16 changes: 7 additions & 9 deletions FBSDKLoginKit/FBSDKLoginKitTests/DependentAsInstanceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,24 @@ private final class CustomImplementationDependent: DependentAsInstance {

fileprivate extension String {
static let missingDependencies = """
Attempting to get the missing dependencies of a dependent should throw a missing instance dependencies error
Attempting to get the missing dependencies of a dependent throws a missing instance dependencies error
"""
static let defaultDependencies = """
If a dependent's configured dependencies are missing, its default dependencies should be provided
"""
static let customDependencies = """
If a dependent has configured dependencies, those dependencies should be provided
When a dependent's configured dependencies are missing, its default dependencies are provided
"""
static let customDependencies = "When a dependent has configured dependencies, those dependencies are provided"

static let defaultSetDependenciesImplementation = """
A dependent should have a default `setDependencies(_:)` implementation that sets its configured dependencies
A dependent has a default `setDependencies(_:)` implementation that sets its configured dependencies
"""
static let customSetDependenciesImplementation = """
A dependent should be able to override the default `setDependencies(_:)` implementation
A dependent can override the default `setDependencies(_:)` implementation
"""

static let defaultResetDependenciesImplementation = """
A dependent should have a default `resetDependencies()` implementation that clears its configured dependencies
A dependent has a default `resetDependencies()` implementation that clears its configured dependencies
"""
static let customResetDependenciesImplementation = """
A dependent should be able to override the default `resetDependencies()` implementation
A dependent can override the default `resetDependencies()` implementation
"""
}
16 changes: 7 additions & 9 deletions FBSDKLoginKit/FBSDKLoginKitTests/DependentAsTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,24 @@ private enum CustomImplementationDependent: DependentAsType {

fileprivate extension String {
static let missingDependencies = """
Attempting to get the missing dependencies of a dependent should throw a missing type dependencies error
Attempting to get the missing dependencies of a dependent throws a missing type dependencies error
"""
static let defaultDependencies = """
If a dependent's configured dependencies are missing, its default dependencies should be provided
"""
static let customDependencies = """
If a dependent has configured dependencies, those dependencies should be provided
When a dependent's configured dependencies are missing, its default dependencies are provided
"""
static let customDependencies = "When a dependent has configured dependencies, those dependencies are provided"

static let defaultSetDependenciesImplementation = """
A dependent should have a default `setDependencies(_:)` implementation that sets its configured dependencies
A dependent has a default `setDependencies(_:)` implementation that sets its configured dependencies
"""
static let customSetDependenciesImplementation = """
A dependent should be able to override the default `setDependencies(_:)` implementation
A dependent can override the default `setDependencies(_:)` implementation
"""

static let defaultResetDependenciesImplementation = """
A dependent should have a default `resetDependencies()` implementation that clears its configured dependencies
A dependent has a default `resetDependencies()` implementation that clears its configured dependencies
"""
static let customResetDependenciesImplementation = """
A dependent should be able to override the default `resetDependencies()` implementation
A dependent can override the default `resetDependencies()` implementation
"""
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,24 @@ private enum CustomImplementationDependent: DependentAsType {

fileprivate extension String {
static let missingDependencies = """
Attempting to get the missing dependencies of a dependent should throw a missing type dependencies error
Attempting to get the missing dependencies of a dependent throws a missing type dependencies error
"""
static let defaultDependencies = """
If a dependent's configured dependencies are missing, its default dependencies should be provided
"""
static let customDependencies = """
If a dependent has configured dependencies, those dependencies should be provided
When a dependent's configured dependencies are missing, its default dependencies are provided
"""
static let customDependencies = "When a dependent has configured dependencies, those dependencies are provided"

static let defaultSetDependenciesImplementation = """
A dependent should have a default `setDependencies(_:)` implementation that sets its configured dependencies
A dependent has a default `setDependencies(_:)` implementation that sets its configured dependencies
"""
static let customSetDependenciesImplementation = """
A dependent should be able to override the default `setDependencies(_:)` implementation
A dependent can override the default `setDependencies(_:)` implementation
"""

static let defaultResetDependenciesImplementation = """
A dependent should have a default `resetDependencies()` implementation that clears its configured dependencies
A dependent has a default `resetDependencies()` implementation that clears its configured dependencies
"""
static let customResetDependenciesImplementation = """
A dependent should be able to override the default `resetDependencies()` implementation
A dependent can override the default `resetDependencies()` implementation
"""
}

0 comments on commit cdb34d9

Please sign in to comment.