public void EqualsReturnsTrueIfSameObject() { var fileLock = new FileLock(123, "ProcessName", 456, DateTime.Now.Ticks); // ReSharper disable once EqualExpressionComparison Assert.That(fileLock.Equals(fileLock), Is.True); }
public void EqualsReturnsFalseIfOtherObjectIsDifferentType() { var fileLock = new FileLock { ProcessId = 123, ProcessName = "ProcessName", ThreadId = 456, Timestamp = DateTime.Now.Ticks }; Assert.That(fileLock.Equals(new object()), Is.False); }
public void EqualsReturnsTrueIfSameObject() { var fileLock = new FileLock { ProcessId = 123, ProcessName = "ProcessName", ThreadId = 456, Timestamp = DateTime.Now.Ticks }; // ReSharper disable once EqualExpressionComparison Assert.That(fileLock.Equals(fileLock), Is.True); }
public void EqualsReturnsFalseIfOtherObjectIsDifferentType() { var fileLock = new FileLock(123, "ProcessName", 456, DateTime.Now.Ticks); Assert.That(fileLock.Equals(new object()), Is.False); }
public void EqualsReturnsFalseIfOtherObjectIsNull() { var fileLock = new FileLock(123, "ProcessName", 456, DateTime.Now.Ticks); Assert.That(fileLock.Equals(null), Is.False); }