public async Task FindAsync_Returns_Sorted_FoundByIsoCode() { var data = new List <Currency> { new Currency { IsoCode = "CC", Name = "UUU" }, new Currency { IsoCode = "BB", Name = "XXX" }, new Currency { IsoCode = "DD", Name = "YYY" }, new Currency { IsoCode = "AA", Name = "YYY" }, }; var mockSet = new Mock <DbSet <Currency> >().SetupData(data); var mockContext = new Mock <CountryContext>(); mockContext.Setup(c => c.Currencies).Returns(mockSet.Object); var service = new CurrencyRepository(mockContext.Object); // Act var items = (await service.FindAsync(new string[] { "BB", "CC" })).ToList(); Assert.IsNotNull(items); Assert.AreEqual(items.Count, 2); Assert.AreEqual(items[0].IsoCode, "BB"); Assert.AreEqual(items[1].IsoCode, "CC"); }