-
-
Save farhadmpr/39b386b96f5023a78f0258326a45e077 to your computer and use it in GitHub Desktop.
Ambient Context #5
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
class LocationManagerStub: LocationService { | |
var isLocationServiceAuthorized: Bool | |
init(isLocationServiceAuthorized: Bool) { | |
self.isLocationServiceAuthorized = isLocationServiceAuthorized | |
} | |
func isAuthorized() -> Bool { | |
return isLocationServiceAuthorized | |
} | |
//.... | |
} | |
class DateProviderStub: DateProviderService { | |
var dateComponents: DateComponents | |
init(dateComponents: DateComponents) { | |
self.dateComponents = dateComponents | |
} | |
var date: Date { | |
return dateComponents.date! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment