public async Task TestGetAll() { try { List <Election> ans = (await electionService.GetAll(Context)).ToList(); Assert.IsNotNull(ans, "There is at least one election in the default dataset"); Assert.IsTrue(ans[0].Id == DefaultElectionId, "Expecting the defaultElection to have Id of " + DefaultElectionId); } catch (Exception ex) { Assert.IsNull(ex, "Exception Thrown: " + ex.Message); } }