public void ShouldBeAbleToUseBuildHierarchy()
        {
            var hierarchySpec = Substitute.For <IHierarchySpec <MyClass> >();

            listBuilderImpl.Build().Returns(new List <MyClass>());


            var list = ListBuilderExtensions.BuildHierarchy(listBuilderImpl, hierarchySpec);

            list.ShouldBeOfType <List <MyClass> >();
        }
        public void ShouldBeAbleToUseBuildHierarchy()
        {
            var hierarchySpec = Substitute.For <IHierarchySpec <MyClass> >();

            listBuilderImpl.Build().Returns(new List <MyClass>());


            var list = ListBuilderExtensions.BuildHierarchy(listBuilderImpl, hierarchySpec);

            Assert.That(list, Is.TypeOf(typeof(List <MyClass>)));
        }
        public void ShouldBeAbleToUseBuildHierarchy()
        {
            var hierarchySpec = mocks.Stub <IHierarchySpec <MyClass> >();

            using (mocks.Record())
            {
                listBuilderImpl.Expect(x => x.Build()).Return(new List <MyClass>()).Repeat.Any();
            }

            using (mocks.Playback())
            {
                var list = ListBuilderExtensions.BuildHierarchy(listBuilderImpl, hierarchySpec);

                Assert.That(list, Is.TypeOf(typeof(List <MyClass>)));
            }
        }