Beispiel #1
0
 public void AddTwoStringsBadInput()
 {
     string input1 = "1";
     string input2 = "kjwjrjkrjkerjk";
     Addition operation_class = new Addition();
     operation_class.AddStrings(input1,input2); // This is not an Assert
 }
Beispiel #2
0
 public void TestCanAddTwoIntegers()
 {
     int input1 = 1;
     int input2 = 2;
     int expected = 3;
     Addition operation_class = new Addition();
     Assert.AreEqual(expected, operation_class.Add(input1, input2)); // "Add" must be defined.
 }
Beispiel #3
0
 public void CanAddTwoStringsGoodInput()
 {
     string input1 = "2";
     string input2 = "1";
     int expected = 3;
     Addition operation_class = new Addition();
     Assert.AreEqual(expected, operation_class.AddStrings(input1, input2));
 }
Beispiel #4
0
 public void CanAddTwoNegativeNumbers()
 {
     int input1 = -1;
     int input2 = -4;
     int expected = -5;
     Addition operation_class = new Addition();
     Assert.AreEqual(expected, operation_class.Add(input1, input2));
 }
Beispiel #5
0
 public void CanNotAddAnIntegerToAString()
 {
     // Ahh. The Add method can't accept string as input.
     int input1 = -1;
     string input2 = "0";
     int expected = -5;
     Addition operation_class = new Addition();
     //Assert.AreEqual(expected, operation_class.Add(input1, input2));
 }
Beispiel #6
0
 public void TestCanCreateAdditionInstance()
 {
     Addition operation_class = new Addition();
 }