Ejemplo n.º 1
0
        public void CreateInstance_GivenASpecificCarName_ReturnsTheAppropriateIAutoInstance(string carName, Type expectedCarType)
        {
            //arrange
            AutoFactory autoFactory = new AutoFactory();

            //act
            IAuto actualCar = autoFactory.CreateInstance(carName);

            //assert
            actualCar.Should().BeOfType(expectedCarType);
        }
Ejemplo n.º 2
0
        public void CreateAutomobile_ReturnsTheConfiguredIAutoInstance()
        {
            //arrange
            IAutoFactory autoFactory            = LoadFactory.GetInstance();
            Type         expectedAutomobileType = typeof(MiniCooper);

            //act
            IAuto actualAutomobile = autoFactory.CreateAutomobile();

            //assert
            actualAutomobile.Should().BeOfType(expectedAutomobileType);
        }