public static async void CheckCredentialsWithValidAndInValidAndReturnTrue() { //Arrange IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(true); Account wrongAccount = new Account { Username = new Bogus.DataSets.Hacker().Phrase(), Password = new Bogus.DataSets.Hacker().Phrase(), OnServerId = "en" }; Account validAccount = SecretData.GetValidTestAccount(); //Act ConnectResult result1 = await _gameDataRepository.TestAccountASync(wrongAccount); ConnectResult result2 = await _gameDataRepository.TestAccountASync(validAccount); //Assert Assert.False(result1.IsConnected); Assert.True(result2.IsConnected); }
public static async void FullTW2DataHarvest() { //Arrange IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(true); Account account = SecretData.GetValidTestAccount(); //Act _gameDataRepository.InsertOrUpdateAccount(account); await _gameDataRepository.TestAccountASync(account); Account foundAccount = _gameDataRepository.GetAccount(account.Id); //Assert Assert.NotNull(foundAccount); Assert.NotNull(foundAccount.TW2AccountID); //Act var result = await _gameDataRepository.EstablishConnection(foundAccount); //Assert Assert.True(result); }
public async Task <ConnectResult> TestAccountASync(Account account) { return(await _gameDataRepository.TestAccountASync(account)); }