public void TryRetrieveTokenFromDatabase_UnknownId_ReturnsEmptyObject()
        {
            var userId = Guid.NewGuid();
            var data = Enumerable.Empty<UserToken>().AsQueryable();

            var fakeDbSet = SetupFakeDbSet(data);
            var fakeContext = SetupFakeDbContext(fakeDbSet);

            var sut = new UserTokenRepository(fakeContext);

            var result = sut.TryRetrieveTokenFromDatabase(userId);

            Assert.That(result, Is.EqualTo(UserToken.Empty));
        }
        public void TryRetrieveTokenFromDatabase_KnownId_ReturnsObjectFromDatabase()
        {
            var userId = Guid.NewGuid();
            var expected = new UserToken
            {
                Id = Guid.NewGuid(),
                UserId = userId,
                DropboxAccessToken = "dropbox_token",
                ExactAccessToken = "exact_token"
            };

            var data = new List<UserToken> { expected }.AsQueryable();

            var fakeDbSet = SetupFakeDbSet(data);
            var fakeContext = SetupFakeDbContext(fakeDbSet);

            var sut = new UserTokenRepository(fakeContext);

            var result = sut.TryRetrieveTokenFromDatabase(userId);

            Assert.That(result, Is.EqualTo(expected));
        }