I would like to test a method with optional Parameters in MSTest.
private CalcSomthing(double valueone, double valuetwo = 10)
{
// Do somthing
}
When i call this method it works fine. But wen i run it in Unittest (MSTest) the Valuetwo wouldn't initialize with value 10.
Are MSTest unable to test optional Parameter or i'm wrong?
[TestMethod]
public void CalcSomthingTest()
{
var someclass= new Someclass_Accessor();
someclass.CalcSomthing(10);
}
The result is: Valueone = 10 and ValueTwo = 0.0;