public void ReturnsTrueIfTheUserDataWasStoredInThePrivateStorage()
            {
                PrivateSharedStorageService.HasUserDataStored().Returns(true);
                PrivateSharedStorageService.GetApiToken().Returns("ApiToken");

                var result = UserAccessManager.CheckIfLoggedIn();

                result.Should().BeTrue();
            }
            public void EmitsWhenUserIsLoggedInAndDataIsAlreadyStoredInThePrivateStorage()
            {
                var observer = Substitute.For <IObserver <ITogglApi> >();

                UserAccessManager.UserLoggedIn.Subscribe(observer);
                PrivateSharedStorageService.HasUserDataStored().Returns(true);
                PrivateSharedStorageService.GetApiToken().Returns("ApiToken");

                UserAccessManager.LoginWithSavedCredentials();

                observer.Received().OnNext(Arg.Any <ITogglApi>());
            }