Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/1.1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
newboadki committed Dec 2, 2021
2 parents 7c191df + 49f6831 commit cc61582
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Harmony.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Harmony'
s.version = '1.1.4'
s.version = '1.1.5'
s.summary = 'Mobile Jazz Harmony Core'
s.swift_version = '5'

Expand Down
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/BoolObjectMother.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
// limitations under the License.
//

#if DEBUG

import Foundation

/* These functions are internal to only be retrieved using '@testable import Harmony'. */

func randomBool() -> Bool {
return Int.random(in: 0...1) != 0
}
#endif
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/DoubleObjectMother.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
// limitations under the License.
//

#if DEBUG

import Foundation

/* These functions are internal to only be retrieved using '@testable import Harmony'. */

func anyDouble(minValue: Double = -32000, maxValue: Double = 32000) -> Double {
return Double.random(in: minValue...maxValue)
}
#endif
2 changes: 2 additions & 0 deletions Harmony/Classes/Testing/ErrorObjectMother.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
// limitations under the License.
//

#if DEBUG
import Foundation

/* These functions are internal to only be retrieved using '@testable import Harmony'. */

func anyError() -> Error {
CoreError.Failed()
}
#endif
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/IntegerObjectModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
// limitations under the License.
//

#if DEBUG

import Foundation

/* These functions are internal to only be retrieved using '@testable import Harmony'. */

func anyInt(minValue: Int = -32000, maxValue: Int = 32000) -> Int {
return Int.random(in: minValue...maxValue)
}
#endif
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/MockInteractorDelete.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//

#if DEBUG

public extension Interactor {

class MockDeleteByQuery: DeleteByQuery {
Expand Down Expand Up @@ -181,3 +183,4 @@ public extension Interactor {
}
}
}
#endif
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/MockInteractorGet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//

#if DEBUG

public extension Interactor {

class MockGetByQuery<T>: GetByQuery<T> {
Expand Down Expand Up @@ -178,3 +180,4 @@ public extension Interactor {
}
}
}
#endif
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/MockInteractorPut.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//

#if DEBUG

public extension Interactor {

class MockPutByQuery<T>: PutByQuery<T> {
Expand Down Expand Up @@ -190,3 +192,4 @@ public extension Interactor {
}
}
}
#endif
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/StringObjectMother.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
// limitations under the License.
//

#if DEBUG

import Foundation

/* These functions are internal to only be retrieved using '@testable import Harmony'. */

func anyString() -> String {
"test-string"
}
#endif
3 changes: 2 additions & 1 deletion Harmony/Classes/Testing/TestUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


/* These functions are internal to only be retrieved using '@testable import Harmony'. */

#if DEBUG
enum TestUtils<T> {
static func result(expectedResult: Result<T, Error>) -> Future<T> {
switch expectedResult {
Expand All @@ -27,3 +27,4 @@ enum TestUtils<T> {
}
}
}
#endif
3 changes: 3 additions & 0 deletions Harmony/Classes/Testing/UUIDObjectMother.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
// limitations under the License.
//

#if DEBUG

import Foundation

/* These functions are internal to only be retrieved using '@testable import Harmony'. */

func anyUUID() -> UUID {
UUID()
}
#endif

0 comments on commit cc61582

Please sign in to comment.