예제 #1
0
        public void CarInstance()
        {
            //Arrange
            string manufacturerNameEx = "NewManufacturer";
            Manufacturer manuEx = new Manufacturer { Name = manufacturerNameEx };
            string modelNameEx = "NewModel";
            double engineEx = 2;
            EnumCategory catEx = EnumCategory.Intermediate;
            Model model = new Model { Name = modelNameEx, Manufacturer = manuEx, Engine = engineEx, Category = catEx };
            EnumColor colorEx = EnumColor.White;
            string plateEx = "qwe1234";
            decimal priceEx = 50;

            //Act
            Car found = new Car
            {
                CarColor = colorEx,
                LicensePlate = plateEx,
                Model = model,
                Price = priceEx
            };

            //Assert
            Assert.AreEqual(colorEx, found.CarColor);
            Assert.AreEqual(plateEx, found.LicensePlate);
            Assert.AreEqual(priceEx, found.Price);
        }
예제 #2
0
 public void Update(Car item)
 {
     carRepo.Update(item);
 }
예제 #3
0
 public void Add(Car item)
 {
     carRepo.Add(item);
 }