I have some test code that looks like this:
[Test]
public void RunTableInfoCommandShouldCallTableINfoWithName()
{
string expectedcommand = "TableInfo(TestTable,1)";
Table.RunTableInfoCommand(mockmapinfo.Object,
"TestTable",
TableInfoEnum.TAB_INFO_NAME); //This is just an enum for 1.
mockmapinfo.Verify(m => m.Evaluate(expectedcommand));
}
Should I be creating a test with a mock object just to see if the expected command that is used by the mock is called in RunTableInfoCommand
Or should I just have a test that checks the output of RunTableInfoCommand and use the mock there because that would test to see if the call is made also.
RunTableInfoCommand returns a string, as you can see I haven't used it here because I just want to see if the TableInfo command is even called.