public void it_should_return_the_base_classes_for_a_class_with_many_ancestor() { var sut = new OpenedUpStashTypeHierarchy(); var actual = sut.OpenedGetTypeHierarchyFor(typeof(ClassWithTwoAncestors)); actual.ShouldContain(_ => _ == typeof(ClassWithOneAncestors)); actual.ShouldContain(_ => _ == typeof(ClassWithTwoAncestors)); actual.ShouldContain(_ => _ == typeof(ClassWithNoAncestors)); }
public void it_should_return_two_types_for_a_class_with_one_ancestor() { var sut = new OpenedUpStashTypeHierarchy(); var actual = sut.OpenedGetTypeHierarchyFor(typeof(ClassWithOneAncestors)); actual.ShouldHaveCount(2); }
public void it_should_return_only_the_object_type_for_something_that_has_object_as_its_base_class() { var sut = new OpenedUpStashTypeHierarchy(); var actual = sut.OpenedGetTypeHierarchyFor(typeof(ClassWithNoAncestors)); actual.ShouldContain(_ => _ == typeof(ClassWithNoAncestors)); }