public void CanCreateDiscount() { // Arrange var discount = new GasDiscount { Program = "Costco membership", Amount = 0.6m.GetCad(), DiscountType = GasDiscountType.PerLiter, Comment = "Test Discount", IsActive = true, }; // Act var savedDisc = _manager.Create(discount); // Assert Assert.NotNull(savedDisc); Assert.True(savedDisc.Id >= 1, "savedDisc.Id>=1"); Assert.Equal(_authorId.ToString(), savedDisc.AuthorId.ToString()); }
public void CanCreateAutoMobile() { // Arrange var car = new AutomobileInfo { Brand = "AutoBack", Maker = "Subaru", MeterReading = 100, Year = "2018", Pin = "1234", Color = "Blue", Plate = "BCTT208" }; // Act var savedCar = _manager.Create(car); // Assert Assert.True(_manager.ProcessResult.Success); Assert.NotNull(savedCar); Assert.True(savedCar.Id >= 1, "car.Id >= 1"); }