Skip to content
Snippets Groups Projects
Select Git revision
  • d6f65882812e2e48432512a27cc17e28fc54efe0
  • main default protected
  • development
  • integration
  • v1.1.5
  • v1.1.4
  • v1.1.3
  • v1.1.2
  • v1.1.1
  • v1.1.0
  • v1.0.0
11 results

E2EPartitionSize.swift

Blame
  • Dariusz Rybicki's avatar
    Dariusz Rybicki authored
    df15d9f9
    History
    E2EPartitionSize.swift 785 B
    import Bindings
    import XCTestDynamicOverlay
    
    public struct E2EPartitionSize {
      public var first: () -> Int
      public var second: () -> Int
      public var atIndex: (Int) -> Int
    
      subscript(payloadIndex payloadIndex: Int) -> Int {
        atIndex(payloadIndex)
      }
    }
    
    extension E2EPartitionSize {
      public static func live(_ bindingsE2E: BindingsE2e) -> E2EPartitionSize {
        E2EPartitionSize(
          first: bindingsE2E.firstPartitionSize,
          second: bindingsE2E.secondPartitionSize,
          atIndex: bindingsE2E.partitionSize(_:)
        )
      }
    }
    
    extension E2EPartitionSize {
      public static let unimplemented = E2EPartitionSize(
        first: XCTUnimplemented("\(Self.self).first"),
        second: XCTUnimplemented("\(Self.self).second"),
        atIndex: XCTUnimplemented("\(Self.self).atIndex")
      )
    }