public async Task Browse_ReturnsListOfHairStyleLinks() { // Arrange _hairStyleLinksContext = _db.SeedHairStyleLinksContext(); List <HairStyleLinks> expected = _db.HairStyleLinks; // Act List <HairStyleLinks> actual = await _hairStyleLinksContext.Browse(); // Assert Assert.Equal(expected.Count, actual.Count); }
public async Task Browse_Limit_Offset_Search_ReturnsFilteredHairStyleLinks() { // Arrange _hairStyleLinksContext = _db.SeedHairStyleLinksContext(); List <HairStyleLinks> expected = _db.HairStyleLinks.FindAll(c => c.LinkName.Trim().ToLower().Contains("afro")); // Act // Equivalent to GET /hair_style_links?limit=1000&offset=0&search=afro List <HairStyleLinks> actual = await _hairStyleLinksContext.Browse("1000", "0", "afro"); // Assert Assert.Equal(expected.Count, actual.Count); }