public void EqualsObjectCastTest() { string code = "test-code"; ServiceError serviceError = new ServiceError(code: code); object obj = new ServiceError(code: code); Assert.True(serviceError.Equals(obj)); }
public void EqualsTest() { string code = "test-code"; ServiceError code1 = new ServiceError(code: code); Assert.Equal(code1, code1); Assert.Equal(code1, new ServiceError(code: code)); Assert.NotEqual(code1, new ServiceError(code: code + "1")); Assert.False(code1.Equals(null)); }