This file contains 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
1.0 |
This file contains 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
verify(StorageThing) | |
.hasNoEntry("something") | |
sut = UnitBeingTested() | |
verify(StorageThing) | |
.hasEntry("something") |
This file contains 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
sut = UnitBeingTested() | |
verify(StorageThing) | |
.hasEntry("something") |
This file contains 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
mockedDependency = mock(DependencyOfUnitBeingTested) | |
sut = UnitBeingTested("a value", mockedDependency) | |
verify(sut.value) | |
.is("a value") | |
verify(mockedDependency) | |
.callMadeTo(functionCalledByUnitBeingTested) | |
.withParameter("a value") |
This file contains 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
sut = UnitBeingTested("a value") | |
verify(sut.value) | |
.is("a value") |
This file contains 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
delegate = ADelegate() | |
sut = UnitBeingTested(delegate) | |
sut.aFunctionCall() | |
verify(delegate) | |
.callMadeTo(onSuccess) | |
verify(delegate) | |
.callNOTMadeTo(onError) |
This file contains 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
delegate = ADelegate() | |
sut = UnitBeingTested(delegate) | |
sut.aFunctionCall() | |
verify(delegate) | |
.callMadeTo(onSuccess) |
This file contains 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
delegate = ADelegate() | |
sut = UnitBeingTested(delegate) | |
sut.aFunctionCall() | |
verify(delegate) | |
.callMadeTo(functionOnDelegate) | |
.withParameter("1234") |
This file contains 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
delegate = ADelegate() | |
sut = UnitBeingTested(delegate) | |
sut.aFunctionCall() | |
verify(delegate) | |
.callMadeTo(functionOnDelegate) | |
.withParameter(anything()) |
This file contains 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
// | |
// Created by Chris Mash on 10/02/2022. | |
// | |
import UIKit | |
import ProvisioningProfile | |
import FirebaseDatabase | |
// NOTE: this gist uses some personal extensions I've written which aren't shared here but you should be able to swap out easily enough: | |
// Bundle.main.appVersion |
NewerOlder