public async Task GetRefreshTokenByCondition_ShouldReturnRefreshToken() { // Act var token = await _refreshTokenRepository.FindSingleByCondition((token) => token.Token == "token1" && token.User.UserName == "User1"); // Assert Assert.Equal(1, token.Id); Assert.Equal("token1", token.Token); Assert.Equal("User1", token.User.UserName); Assert.Equal("*****@*****.**", token.User.Email); }
public Task <RefreshTokenEntity> GetToken(string refreshToken) { Expression <Func <RefreshTokenEntity, bool> > condition = (token) => token.Token == refreshToken; return(_refreshTokenRepository.FindSingleByCondition(condition)); }