Exemplo n.º 1
0
        private List <IComponent> DummyCarComponents()
        {
            var componentFactory   = new ComponentFactory("car");
            var dummyCarComponents = componentFactory.CreateComponents();

            return(dummyCarComponents);
        }
Exemplo n.º 2
0
        public List <IComponent> DummyPlaneComponents()
        {
            var componentFactory     = new ComponentFactory("plane");
            var dummyPlaneComponents = componentFactory.CreateComponents();

            return(dummyPlaneComponents);
        }
Exemplo n.º 3
0
        public void WhenComponentFactoryIsCalledWithVehicleTypeofCarParameter_ThenAListOfComponentObjectsIsReturned(
            string vehicleType)
        {
            var componentFactory = new ComponentFactory(vehicleType);
            var expected         = DummyCarComponents();
            var result           = componentFactory.CreateComponents();
            int i = 0;

            foreach (IComponent component in result)
            {
                component.Should().Be(result[i]);
                i++;
            }
        }