Example #1
0
        public void ReturnCorrectAutos_WhenMakeIsValid(string make, int expected)
        {
            //Arrange

            //Act
            var result = autoControl.FindCarsByMake(make);

            //Assert
            Assert.AreEqual(expected, result.Count);
        }
Example #2
0
        public void ReturnCorrectInstanceOf0_WhenLookingForAudiMake()
        {
            //Arrange

            Mock <SUT.IAutoDBAccess> myInventory = new Mock <SUT.IAutoDBAccess>();

            myInventory.Setup(x => x.LoadLot()).Returns(AutoListTest());
            var findCar = new SUT.AutoControl(myInventory.Object);

            //Act
            var result = findCar.FindCarsByMake("Audi");

            //Assert

            Assert.IsTrue(result.Count.Equals(0));
        }