public async Task ShouldGetAllUsers() { var users = await CreateUsers(); var objs = (await _resource.ListAsync()).ToArray(); Assert.Equal(2, objs.Length); Assert.Equal(JsonConvert.SerializeObject(users[0]), JsonConvert.SerializeObject(objs[0])); Assert.Equal(JsonConvert.SerializeObject(users[1]), JsonConvert.SerializeObject(objs[1])); }
public async Task ListAsync_WhenCalled_ShouldGetAllUsers() { var results = await _resource.ListAsync(); Assert.Equal(100, results.Count); for (var i = 1; i <= 100; i++) { var user = results.ElementAt(i - 1); Assert.Equal($"name.{i}", user.Name); Assert.Equal($"email.{i}", user.Email); Assert.Equal(i.ToString(), user.ExternalId); } }