本文整理汇总了C#中NoSpecimen.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# NoSpecimen.Equals方法的具体用法?C# NoSpecimen.Equals怎么用?C# NoSpecimen.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NoSpecimen
的用法示例。
在下文中一共展示了NoSpecimen.Equals方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SutDoesNotEqualNullSut
public void SutDoesNotEqualNullSut()
{
// Fixture setup
var sut = new NoSpecimen();
NoSpecimen other = null;
// Exercise system
var result = sut.Equals(other);
// Verify outcome
Assert.False(result, "Equals");
// Teardown
}
示例2: SutDoesNotEqualAnonymousObject
public void SutDoesNotEqualAnonymousObject()
{
// Fixture setup
var sut = new NoSpecimen();
var anonymousObject = new object();
// Exercise system
var result = sut.Equals(anonymousObject);
// Verify outcome
Assert.False(result, "Equals");
// Teardown
}
示例3: SutEqualsOtherSutWhenRequestsAreEqual
public void SutEqualsOtherSutWhenRequestsAreEqual()
{
// Fixture setup
var request = new object();
#pragma warning disable 618
var sut = new NoSpecimen(request);
var other = new NoSpecimen(request);
#pragma warning restore 618
// Exercise system
var result = sut.Equals(other);
// Verify outcome
Assert.True(result, "Equals");
// Teardown
}
示例4: SutEqualsOtherSutWhenBothRequestsAreNull
public void SutEqualsOtherSutWhenBothRequestsAreNull()
{
// Fixture setup
var sut = new NoSpecimen();
var other = new NoSpecimen();
// Exercise system
var result = sut.Equals(other);
// Verify outcome
Assert.True(result, "Equals");
// Teardown
}
示例5: SutDoesNotEqualOtherSutWhenRequestsDiffer
public void SutDoesNotEqualOtherSutWhenRequestsDiffer()
{
// Fixture setup
#pragma warning disable 618
var sut = new NoSpecimen(new object());
var other = new NoSpecimen(new object());
#pragma warning restore 618
// Exercise system
var result = sut.Equals(other);
// Verify outcome
Assert.False(result, "Equals");
// Teardown
}
示例6: SutDoesNotEqualOtherObjectWhenSutRequestIsNull
public void SutDoesNotEqualOtherObjectWhenSutRequestIsNull()
{
// Fixture setup
var sut = new NoSpecimen();
object other = new NoSpecimen(new object());
// Exercise system
var result = sut.Equals(other);
// Verify outcome
Assert.False(result, "Equals");
// Teardown
}
示例7: SutEqualsOtherObjectWhenRequestsAreEqual
public void SutEqualsOtherObjectWhenRequestsAreEqual()
{
// Fixture setup
var request = new object();
var sut = new NoSpecimen(request);
object other = new NoSpecimen(request);
// Exercise system
var result = sut.Equals(other);
// Verify outcome
Assert.True(result, "Equals");
// Teardown
}