我正在尝试对如下所示的方法创建单元测试:
Public Function TimeClock_Append(ByVal timeClockUploadJson As TimeClockUploadJson) As TimeClockUploadJson Implements IResourceCommanderData.TimeClock_Append
...
End Function
当我右键单击函数名称并选择“创建单元测试”时,这就是我得到的......
'TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
' http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
' whether you are testing a page, web service, or a WCF service.
'''<summary>
'''A test for TimeClock_Append
'''</summary>
<TestMethod(), _
HostType("ASP.NET"), _
AspNetDevelopmentServerHost("C:\Projects\ACS.ResourceCommander 3.8\ACS.ResourceCommander.WCFRest", "/ACS.ResourceCommander.WCFRest"), _
UrlToTest("http://localhost/ACS.ResourceCommander.WCFRest")> _
Public Sub TimeClock_AppendTest()
'Private Accessor for TimeClock_Append is not found. Please rebuild the containing project or run the Publicize.exe manually.
Assert.Inconclusive("Private Accessor for TimeClock_Append is not found. Please rebuild the containing" & _
" project or run the Publicize.exe manually.")
End Sub
我不明白“未找到 TimeClock_Append 的私有访问器。请重建包含项目或手动运行 Publicize.exe”消息。
我尝试删除与此方法相关的测试引用文件夹中的文件,然后右键单击该方法并选择“创建私有访问器”,但没有解决任何问题。
我该如何解决这个问题?