protected override void AdditionalSetup() { Location.CountryCode.Returns("LV"); Location.CountryName.Returns("Latvia"); Api.Location.Get().Returns(Observable.Return(Location)); ApiFactory.CreateApiWith(Arg.Any <Credentials>()).Returns(Api); }
protected UserAccessManagerTest() { UserAccessManager = new UserAccessManager(ApiFactory, Database, GoogleService, ApplicationShortcutCreator, PrivateSharedStorageService, CreateDataSource); Api.User.Get().Returns(Observable.Return(User)); Api.User.SignUp(Email, Password, TermsAccepted, CountryId, Timezone).Returns(Observable.Return(User)); Api.User.GetWithGoogle().Returns(Observable.Return(User)); ApiFactory.CreateApiWith(Arg.Any <Credentials>()).Returns(Api); Database.Clear().Returns(Observable.Return(Unit.Default)); }
protected LoginManagerTest() { LoginManager = new LoginManager(ApiFactory, Database, GoogleService, ApplicationShortcutCreator, AccessRestrictionStorage, AnalyticsService, CreateDataSource, CreateScheduler); Api.User.Get().Returns(Observable.Return(User)); Api.User.SignUp(Email, Password, TermsAccepted, CountryId).Returns(Observable.Return(User)); Api.User.GetWithGoogle().Returns(Observable.Return(User)); ApiFactory.CreateApiWith(Arg.Any <Credentials>()).Returns(Api); Database.Clear().Returns(Observable.Return(Unit.Default)); }
protected UserAccessManagerTest() { UserAccessManager = new UserAccessManager( new Lazy <IApiFactory>(() => ApiFactory), new Lazy <ITogglDatabase>(() => Database), new Lazy <IPrivateSharedStorageService>(() => PrivateSharedStorageService) ); Api.User.Get().Returns(Observable.Return(User)); Api.User.SignUp(Email, Password, TermsAccepted, CountryId, Timezone).Returns(Observable.Return(User)); Api.User.GetWithGoogle().Returns(Observable.Return(User)); ApiFactory.CreateApiWith(Arg.Any <Credentials>()).Returns(Api); Database.Clear().Returns(Observable.Return(Unit.Default)); }
protected override void AdditionalSetup() { Location.CountryCode.Returns("LV"); Location.CountryName.Returns("Latvia"); Api.Location.Get().ReturnsTaskOf(Location); ApiFactory.CreateApiWith(Arg.Any <Credentials>()).Returns(Api); var container = new TestDependencyContainer { MockSyncManager = SyncManager }; TestDependencyContainer.Initialize(container); }