Skip to content
Snippets Groups Projects
Commit 946ef9d0 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add VerifyContactFeature library

parent 5b190dca
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!81Messenger example - contact authorization improvements
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "VerifyContactFeature"
BuildableName = "VerifyContactFeature"
BlueprintName = "VerifyContactFeature"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "VerifyContactFeatureTests"
BuildableName = "VerifyContactFeatureTests"
BlueprintName = "VerifyContactFeatureTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "VerifyContactFeature"
BuildableName = "VerifyContactFeature"
BlueprintName = "VerifyContactFeature"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
...@@ -27,6 +27,7 @@ let package = Package( ...@@ -27,6 +27,7 @@ let package = Package(
.library(name: "RestoreFeature", targets: ["RestoreFeature"]), .library(name: "RestoreFeature", targets: ["RestoreFeature"]),
.library(name: "SendRequestFeature", targets: ["SendRequestFeature"]), .library(name: "SendRequestFeature", targets: ["SendRequestFeature"]),
.library(name: "UserSearchFeature", targets: ["UserSearchFeature"]), .library(name: "UserSearchFeature", targets: ["UserSearchFeature"]),
.library(name: "VerifyContactFeature", targets: ["VerifyContactFeature"]),
.library(name: "WelcomeFeature", targets: ["WelcomeFeature"]), .library(name: "WelcomeFeature", targets: ["WelcomeFeature"]),
], ],
dependencies: [ dependencies: [
...@@ -223,6 +224,18 @@ let package = Package( ...@@ -223,6 +224,18 @@ let package = Package(
], ],
swiftSettings: swiftSettings swiftSettings: swiftSettings
), ),
.target(
name: "VerifyContactFeature",
dependencies: [
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
]
),
.testTarget(
name: "VerifyContactFeatureTests",
dependencies: [
.target(name: "VerifyContactFeature"),
]
),
.target( .target(
name: "WelcomeFeature", name: "WelcomeFeature",
dependencies: [ dependencies: [
......
...@@ -119,6 +119,16 @@ ...@@ -119,6 +119,16 @@
ReferencedContainer = "container:.."> ReferencedContainer = "container:..">
</BuildableReference> </BuildableReference>
</TestableReference> </TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "VerifyContactFeatureTests"
BuildableName = "VerifyContactFeatureTests"
BlueprintName = "VerifyContactFeatureTests"
ReferencedContainer = "container:..">
</BuildableReference>
</TestableReference>
<TestableReference <TestableReference
skipped = "NO"> skipped = "NO">
<BuildableReference <BuildableReference
......
import ComposableArchitecture
import XCTestDynamicOverlay
public struct VerifyContactState: Equatable {
public init() {}
}
public enum VerifyContactAction: Equatable {
case start
}
public struct VerifyContactEnvironment {
public init() {}
}
#if DEBUG
extension VerifyContactEnvironment {
public static let unimplemented = VerifyContactEnvironment()
}
#endif
public let verifyContactReducer = Reducer<VerifyContactState, VerifyContactAction, VerifyContactEnvironment>
{ state, action, env in
switch action {
case .start:
return .none
}
}
import ComposableArchitecture
import SwiftUI
public struct VerifyContactView: View {
public init(store: Store<VerifyContactState, VerifyContactAction>) {
self.store = store
}
let store: Store<VerifyContactState, VerifyContactAction>
struct ViewState: Equatable {
init(state: VerifyContactState) {}
}
public var body: some View {
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
}
.navigationTitle("Verify Contact")
.task { viewStore.send(.start) }
}
}
}
#if DEBUG
public struct VerifyContactView_Previews: PreviewProvider {
public static var previews: some View {
VerifyContactView(store: Store(
initialState: VerifyContactState(),
reducer: .empty,
environment: ()
))
}
}
#endif
import ComposableArchitecture
import XCTest
@testable import VerifyContactFeature
final class VerifyContactFeatureTests: XCTestCase {
func testStart() {
let store = TestStore(
initialState: VerifyContactState(),
reducer: verifyContactReducer,
environment: .unimplemented
)
store.send(.start)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment