public async Task TestQueryServer() { var model = new ServerStore(); // Query a valid server, verify we got results. model.AddServer(onlineQueryableServer); await model.QueryServers(); Assert.AreEqual(1, model.Results.Count); }
public void TestRemoveServer() { var model = new ServerStore(); model.AddServer(onlineQueryableServer); Assert.AreEqual(1, model.Servers.Count); model.RemoveServer(onlineQueryableServer); Assert.AreEqual(0, model.Servers.Count); }
public async Task TestInvalidQuery() { var model = new ServerStore(); // Query an invalid address. model.AddServer(nonexistentServer); await model.QueryServers(); Assert.AreNotEqual(2, model.Results.Count); }