diff --git a/Demo/Demo/App/ContentView.swift b/Demo/Demo/App/ContentView.swift index bac8d0b..e50d2c2 100644 --- a/Demo/Demo/App/ContentView.swift +++ b/Demo/Demo/App/ContentView.swift @@ -36,7 +36,7 @@ private extension ContentView { for await event in self.imagesController.$images.events { switch event.operation { - case .initial: + case .initialized: print("[Store Event: initial] Our Images Store has initialized") case .loaded: diff --git a/Sources/Boutique/StoreEvent.swift b/Sources/Boutique/StoreEvent.swift index dbbf8b3..997cf63 100644 --- a/Sources/Boutique/StoreEvent.swift +++ b/Sources/Boutique/StoreEvent.swift @@ -4,13 +4,13 @@ public struct StoreEvent: StorableItem { public let items: [Item] public enum Operation: StorableItem { - case initial, loaded, insert, remove + case initialized, loaded, insert, remove } } internal extension StoreEvent { static var initial: StoreEvent { - StoreEvent(operation: .initial, items: []) + StoreEvent(operation: .initialized, items: []) } static func loaded(_ items: [Item]) -> StoreEvent { diff --git a/Tests/BoutiqueTests/StoreEvent.Tests.Requirements.swift b/Tests/BoutiqueTests/StoreEvent.Tests.Requirements.swift index 950630d..9e36c1b 100644 --- a/Tests/BoutiqueTests/StoreEvent.Tests.Requirements.swift +++ b/Tests/BoutiqueTests/StoreEvent.Tests.Requirements.swift @@ -4,7 +4,7 @@ import Testing extension Store { func validateStoreEvent(event: StoreEvent) throws { if self.items.isEmpty { - try #require(event.operation == .initial || event.operation == .loaded || event.operation == .remove) + try #require(event.operation == .initialized || event.operation == .loaded || event.operation == .remove) } else { try #require(event.operation == .insert) }