public void Atomic_Should_Implement_Reference_Equality() { var firstAtomic = new Atomic <Guid>(SessionValue); var secondAtomic = new Atomic <Guid>(SessionNullValue); Assert.False(firstAtomic.Equals(secondAtomic)); Assert.False(secondAtomic.Equals(firstAtomic)); // self equality Assert.True(firstAtomic.Equals(firstAtomic)); Assert.True(secondAtomic.Equals(secondAtomic)); }
public void Atomic_IEquatable_Of_Guid_Should_Compare() { IEquatable <Guid> firstAtomic = new Atomic <Guid>(SessionValue); IEquatable <Guid> secondAtomic = new Atomic <Guid>(SessionNullValue); Assert.False(firstAtomic.Equals(SessionNullValue)); Assert.False(secondAtomic.Equals(SessionValue)); }
public void Atomic_Primitive_IEquatable_Of_Primitive_Should_Compare <T>(T minValue, T maxValue) where T : struct, IEquatable <T> { IEquatable <T> firstAtomic = new Atomic <T>(maxValue); IEquatable <T> secondAtomic = new Atomic <T>(minValue); Assert.False(firstAtomic.Equals(minValue)); Assert.False(secondAtomic.Equals(maxValue)); }