Esempio 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);
        }
Esempio 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);
        }