public void FindAllBaseTypesReturnsCorrect() { // Arrange IEdmEntityType baseEntityType = new EdmEntityType("NS", "Base"); IEdmEntityType subEntityType = new EdmEntityType("NS", "Sub", baseEntityType); IEdmEntityType subSubEntityType = new EdmEntityType("NS", "SubSub", subEntityType); // 1. Act & Assert var baseTypes = baseEntityType.FindAllBaseTypes(); Assert.Empty(baseTypes); // 2. Act & Assert baseTypes = subEntityType.FindAllBaseTypes(); Assert.NotNull(baseTypes); var baseType = Assert.Single(baseTypes); Assert.Same(baseType, baseEntityType); // 3. Act & Assert baseTypes = subSubEntityType.FindAllBaseTypes(); Assert.NotNull(baseTypes); Assert.Equal(2, baseTypes.Count()); Assert.Equal(new[] { subEntityType, baseEntityType }, baseTypes); }