Ejemplo n.º 1
0
        public void FilterFailsSingleMissingComponent()
        {
            var componentMock = new Mock<IHasComponents>();
            componentMock.Setup(s => s.HasComponent<ISimpleComponent>()).Returns(false);

            var filter = new GenericComponentFilter<ISimpleComponent>();
            filter.Filter(componentMock.Object).Should().BeFalse();
        }
Ejemplo n.º 2
0
        public void FilterMatchesSingleComponent()
        {
            var componentMock = new Mock<IHasComponents>();
            componentMock.Setup(s => s.HasComponent<ISimpleComponent>()).Returns(true);

            var filter = new GenericComponentFilter<ISimpleComponent>();
            filter.Filter(componentMock.Object).Should().BeTrue();
        }
        public void FilterMatchesSingleComponent()
        {
            var componentMock = new Mock <IHasComponents>();

            componentMock.Setup(s => s.HasComponent <ISimpleComponent>()).Returns(true);

            var filter = new GenericComponentFilter <ISimpleComponent>();

            filter.Filter(componentMock.Object).Should().BeTrue();
        }
        public void FilterFailsSingleMissingComponent()
        {
            var componentMock = new Mock <IHasComponents>();

            componentMock.Setup(s => s.HasComponent <ISimpleComponent>()).Returns(false);

            var filter = new GenericComponentFilter <ISimpleComponent>();

            filter.Filter(componentMock.Object).Should().BeFalse();
        }