I have been trying, unsuccessfully, to get unit tests running on my project (vs2010 pro, asp.net project with vb.net code behind, .net 4.0). Below is my latest attempt and when I run it I get “Inconclusive:Test wasn’t run”. What am I doing wrong?
Imports Microsoft.VisualStudio.TestTools.UnitTesting.Web
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Public Class CriteriaCopy
Private Shared Function ConvertToDBNull(ByVal intGID As Integer) As Object
Dim result
If intGID.Equals(0) Then
result = DBNull.Value
Else
result = intGID
End If
Return result
End Function
<TestClass()>
Class Test
<TestMethod()>
Public Sub ConvertToDBNullTest()
Dim intGID As Integer = 1
Dim expected As Object = 1
Dim actual As Object
actual = ConvertToDBNull(intGID)
Assert.AreEqual(expected, actual)
End Sub
End Class
End Class
I was not able to find a solution to my problem. And since that post, I have created a new solution and project which includes a test project and everything compiles without error. I blame my problem on user error.