dimanche 28 décembre 2014

i am unable to make the smart unit test in visual studio 2015? [duplicate]


This question already has an answer here:




this is my code.



class Program
{
public static void cal(int n1, int n2,
out int add, out int sub, out int mul, out float div)
{
add = n1 + n2;
sub = n1 - n2;
mul = n1 * n2;
div = (float)n1 / n2;
}
static void Main(string[] args)
{
int n1, n2;
int add, sub, mul;
float div;
Console.Write("Enter 1st number");
n1 = Convert.ToInt32(Console.ReadLine());
Console.Write("\nEnter 2nd number");
n2 = Convert.ToInt32(Console.ReadLine());

Program.cal(n1, n2, out add, out sub, out mul, out div);
Console.WriteLine("\n\n{0} + {1} = {2}", n1, n2, add);
Console.WriteLine("{0} - {1} = {2}", n1, n2, sub);
Console.WriteLine("{0} * {1} = {2}", n1, n2, mul);
Console.WriteLine("{0} / {1} = {2}", n1, n2, div);

Console.ReadLine();
}

}


when i goes on method or class and perform right click on it and make a smart unit test then it show an error like- the selected type is not visible and can not be explored/ can not run the test for selected type bcoz the type is not visible. please help me to short out this problem.


Aucun commentaire:

Enregistrer un commentaire