示例#1
0
        public void EqualsObjectCastTest()
        {
            string   mrz1     = "test-mrz1";
            Passport passport = new Passport(mrz1: mrz1);
            object   obj      = new Passport(mrz1: mrz1);

            Assert.True(passport.Equals(obj));
        }
示例#2
0
        public void EqualsTest()
        {
            string   mrz1  = "test-mrz1";
            Passport mrz11 = new Passport(mrz1: mrz1);

            Assert.Equal(mrz11, mrz11);
            Assert.Equal(mrz11, new Passport(mrz1: mrz1));
            Assert.NotEqual(mrz11, new Passport(mrz1: mrz1 + "1"));
            Assert.False(mrz11.Equals(null));
        }
示例#3
0
 public bool Equals(Employee other)
 {
     return(Passport.Equals(other.Passport));
 }