Ejemplo n.º 1
0
 public void Check_Constructor_With_Params_Success()
 {
     // arrange
     string name = "John";
     double amount = 150.0;
     bool hasCard = true;
     // act
     Customer testCustomer = new Customer(name, amount, hasCard);
     // assert
     Assert.AreEqual(name, testCustomer.Name);
     Assert.AreEqual(amount + 50, testCustomer.Amount);
     Assert.AreEqual(hasCard, testCustomer.HasCard);
 }
Ejemplo n.º 2
0
 public void Check_IsEnaugh_Success()
 {
     // arrange
     string name = "John";
     double amount = 150.0;
     bool hasCard = true;
     Customer testCustomer = new Customer(name, amount, hasCard);
     double sum = 100.0;
     // act
     bool isSuccess = testCustomer.IsEnaugh(sum);
     // assert
     Assert.AreEqual(true, isSuccess);
 }
Ejemplo n.º 3
0
 public void Check_Constructor_Without_Params_Success()
 {
     // arrange
     string name = "Unknown";
     double amount = 0.0;
     bool hasCard = false;
     // act
     Customer testCustomer = new Customer();
     // assert
     Assert.AreEqual(name, testCustomer.Name);
     Assert.AreEqual(amount, testCustomer.Amount);
     Assert.AreEqual(hasCard, testCustomer.HasCard);
 }