I am new to the Unit Testing And using Nunit i dont know how to pass this exception but there is an AssertionUnhandled Exception.
I am doing
Assert.AreEqual(exists, 1 == (int)ExecScalar(string.Format("SELECT COUNT(*)
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '{0}{1}' AND TABLE_SCHEMA ='{2}'",
(audit ? DBHelper.AuditTablePrefix : ""), tableName, schema)));
Here exists = true and in my case other comes to 1==0 so it says Expected True but false.
So what should i do because i dont know how can i move further.
Thanks in advance.
Looks like you are trying to ensure that particular query returns
1as tables count,I would suggest you to wrap such complex query in
Assert.DoesNotThrow()and useAssert.AreEqual()to compare two values: