我有我正在尝试测试的 Equals 方法。如果传递给 is 的对象与此对象相同,则此方法返回 true。
我测试真实情况如下。
var mocks = new MockRepository();
var mockActionAlert = mocks.StrictMock<ActionAlert>();
var mockActionAlert2 = mocks.StrictMock<ActionAlert>();
bool comparer = mockActionAlert.Equals(mockActionAlert2);
Assert.Equal(true, comparer);
但是,我怎样才能获得不同的模拟对象来测试 equal 方法返回 false。
谢谢你,