Ejemplo n.º 1
0
 public void PriceOfCarNotNegativ()
 {
     Assert.Catch(() =>
     {
         var car = new Car("Opel", "100", -3000, "Leder");
     });
 }
Ejemplo n.º 2
0
 public void HPNotEmpty()
 {
     Assert.Catch(() =>
     {
         var car = new Car("Opel", "", 3000, "Leder");
     });
 }
Ejemplo n.º 3
0
 public void ModelNotEmpty()
 {
     Assert.Catch(() =>
     {
         var car = new Car("", "100", 3000, "Leder");
     });
 }
Ejemplo n.º 4
0
 static void Main(string[] args)
 {
     Plane plane = new Plane("Boieng-777", 100, 90, 800, 10000000, DateTime.Parse("5/1/2008 8:30:52 AM", System.Globalization.CultureInfo.InvariantCulture), 17, 400);
     plane.Information(); Console.WriteLine();
     Car car = new Car("BMW-M3", 50, 50, 300, 30000, DateTime.Parse("5/1/2014 16:45:30 PM", System.Globalization.CultureInfo.InvariantCulture));
     car.Information(); Console.WriteLine();
     Ship ship = new Ship("Supreme", 30, 20, 90, 1000000, DateTime.Parse("5/1/2015 8:00:01 AM", System.Globalization.CultureInfo.InvariantCulture), 300, "Shanghai");
     ship.Information();
     Console.ReadKey();
 }
Ejemplo n.º 5
0
 public void PriceValueCorrect()
 {
     var car = new Car("Opel", "120", 3000, "Leder");
     car.UpdatePrice(12000);
     Assert.IsTrue(car.Price == 12000);
 }