public void Return_WorkingEnumerator() { // Arrange TestPerson person = this.fixture.Create <TestPerson>(); string expectedName = person.Name; int expectedAge = person.Age; Mock <IFunkyFactory> funkyFactory = TestHelper.GetMockedFunkyFactory(); Indexed sut = new Indexed(person, true, funkyFactory.Object); // Act Dictionary <string, object> actual = sut.ToDictionary(n => n.Key, n => n.Value); // Assert Assert.IsTrue(actual.ContainsKey(nameof(person.Name))); Assert.AreEqual(expectedName, actual[nameof(person.Name)]); Assert.IsTrue(actual.ContainsKey(nameof(person.Age))); Assert.AreEqual(expectedAge, actual[nameof(person.Age)]); }