📅  最后修改于: 2022-03-11 14:56:50.485000             🧑  作者: Mango
mockPeopleService = new Mock();
var people = ....;
var expectedResult = new GetCatsResponse()
{
Male = new List() { "Garfield", "Jim", "Max", "Tom" },
Female = new List() { "Garfield", "Simba", "Tabby" }
};
mockPeopleService.Setup(ps => ps.GetPeople()).Returns(people);
var handler = new GetCatsHandler(mockPeopleService.Object);
var actualResult = await GetActualResult(handler);
actualResult.Should().BeEquivalentTo(expectedResult, optons => optons.WithStrictOrdering());