C# test

main program


 public class SimpleForTest
 {
     public int Add(int a, int b)
     {
         return a + b;
     }

     public int Mult(int a, int b)
     {
         return a * b;
     }
 }

test


[Fact]
public void TesAdd()
{
    var c = new SimpleForTest();
    Assert.Equal(3, c.Add(1, 2));
}
    

[Theory]
[InlineData(2,3, 6)]
[InlineData(3, 3, 9)]
[InlineData(10, 100, 1000)]
public void TestMult(int a, int b, int expected)
{ 
    var c = new SimpleForTest();
    var result = c.Mult(a, b);
    Assert.Equal(expected, result);            
}
  
[Fact]
public void TestAdd2()
{
var c = new SimpleForTest();
// Assert.Throws(() => c.Add(2, 2));
}