public async Task InvAsync_Local_True_Expected_Result_1() { _logger.Responses.Clear(); TestConsole console = new TestConsole(); bool local = true; ServerListCommand command = new ServerListCommand(local, _store, _logger, _data); var result = await command.InvAsync(console); Assert.AreEqual(1, result); }
public async Task InvAsync_Local_False_And_AuthServer_Username_Wrong_Expected_Result_0() { _logger.Responses.Clear(); TestConsole console = new TestConsole(); bool local = false; _data.User.UserName = "******"; ServerListCommand command = new ServerListCommand(local, _store, _logger, _data); var result = await command.InvAsync(console); Assert.AreEqual(0, result); }
public async Task InvAsync_Local_False_Expected_Result_1_AND_Servers_In_DataStore() { _logger.Responses.Clear(); TestConsole console = new TestConsole(); bool local = false; _data.Servers.Clear(); _store.Write(_data); ServerListCommand command = new ServerListCommand(local, _store, _logger, _data); var result = await command.InvAsync(console); _data = _store.Read(); Assert.AreEqual(1, result); Assert.IsTrue(_data.Servers.Count > 0); }