public void GetParentsWithChildrenTest() { _wordServiceMock.Setup(w => w.GetAll(It.IsAny <WordItemsType>())) .Returns(_words); var result = (_wordController.GetAll(WordItemsType.ParentsWithChildren) as ObjectResult).Value as IEnumerable <WordModel>; result.Should().BeEquivalentTo(_words); }