This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func test_validation_given_valueAIsNotNil_valueBIsNotNilAndTrue_valueCIsNotNilAndFalse_ShouldReturnTrue() { | |
sut.validation(valueA: false, valueB: true, valueC: false) | |
XCTAssertEqual(view.setupCalled, true) | |
XCTAssertEqual(view.setupAPassed, false) | |
XCTAssertEqual(view.setupBPassed, true) | |
XCTAssertEqual(view.setupCPassed, false) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func validation(valueA: Bool?, valueB: Bool?, valueC: Bool?) { | |
guard | |
let a = valueA, | |
let b = valueB, | |
let c = valueC, | |
b,!c | |
else { | |
view.showError("error") | |
return | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func test_EmailIsValid_GivenInputIsEmpty_ShouldReturnFalse() { | |
let inputedEmail = "" | |
XCTAssertEqual(inputedEmail.isValid(), false) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testEmailIsValid() { | |
XCTAssert(inputedEmail.isValid()) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@available(iOS 12.0, watchOS 5.0, *) | |
@available(macOS, unavailable) | |
@available(tvOS, unavailable) | |
@objc(SeriesSuggestionIntentHandling) | |
public protocol SeriesSuggestionIntentHandling: NSObjectProtocol {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SeriesSuggestionIntent.swift | |
// | |
// This file was automatically generated and should not be edited. | |
// | |
#if canImport(Intents) | |
import Intents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function layer(context, selectedLayer) { | |
let object = ''; | |
let result = {}; | |
let x = Math.floor(selectedLayer.rect.x); | |
let y = Math.floor(selectedLayer.rect.y); | |
let width = Math.floor(selectedLayer.rect.width); | |
let height = Math.floor(selectedLayer.rect.height); | |
let rect = "CGRect(x: " + x + ", y: " + y + ", width: " + width + ", height: "+ height + ")"; |
NewerOlder