C
CSharper
I have a class something like the following
class name
{
public string Method1()
{
}
public bool Method2()
{
...
string x = Method1()
....
}
}
I am writing tests for Method2 and when Method1() is called on my
test, I want to pass some orbitary value to make it run. I don't want
the Method1 to execute. I read about Mock, is it the right way to do
it?
Thanks,
class name
{
public string Method1()
{
}
public bool Method2()
{
...
string x = Method1()
....
}
}
I am writing tests for Method2 and when Method1() is called on my
test, I want to pass some orbitary value to make it run. I don't want
the Method1 to execute. I read about Mock, is it the right way to do
it?
Thanks,