Rizwan Ali

Rizwan Ali

  • NA
  • 5.6k
  • 1.6m

smart unit test in visual studio 2015

Dec 29 2014 12:43 AM
when i want to create a smart unit test in visual studio 2015 then it show error which is:
The selected type is not visible and can not be expolred / can not run test for selected type because type is not visible.
my code is this.

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 right click on it create the smart unit test then it show the error.

please help me.

Thanking you