Like all good programmers, I try to understand some things when using TDD with MS Test. I follow the basic scheme of Arrange, Act, Assert, and something is too complicated for my Act code. I believe that there should be only one action in the line of the Law. So, given my sample code below, am I leaving the track by first performing one action, and THEN checks its status? Thanks for the input.
[TestMethod]
public void TheCountOfAllRecordsIsGreaterThanZero()
{
var auditLog = new AuditMasterClass();
auditLog.LogAction("MyPersonName", DateTime.Now, "Stuff", "MoreStuff",
"Desc",
"Comments", true, false,
"UndoStatement");
var count = auditLog.GetCommentCount();
Assert.IsTrue(count > 0);
}
source
share