我有以下单元测试:
Public Sub pickWeaponTest_Rock()
Dim lastMove As String = "Rock"
Dim actualSelectedMove As Weapon = New Paper()
Dim result As Weapon
Dim target As Object = New PlayerComputerTactical() ' TODO: Initialize to an appropriate value
result = target.pickWeapon()
Assert.AreEqual(result, actualSelectedMove)
Assert.Inconclusive("A method that does not return a value cannot be verified.")
End Sub
我收到以下错误,即使两者都是 Paper 对象:
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException 未由用户代码处理 Message=Assert.AreEqual 失败。预期的:。实际的:。
有人可以说明如何使其工作。