Ejemplo n.º 1
0
        public void Performance()
        {
            AddressComparer addressComparer = new AddressComparer();

            foreach (var i in Enumerable.Range(0, 1000000))
            {
                addressComparer.Equals("Cheylesmore House, 6 Quinton Rd, Coventry CV1 2WT,", "Cheylesmore House, 5 Quinton Rd, Coventry CV1 2WT,");
            }
        }
Ejemplo n.º 2
0
        public bool Equals(AddressBookRecord x, AddressBookRecord y)
        {
            if (ReferenceEquals(x, y))
            {
                return(true);
            }

            if (ReferenceEquals(null, x))
            {
                return(false);
            }

            if (ReferenceEquals(null, y))
            {
                return(false);
            }

            return(AddressComparer.Equals(x.Address, y.Address) &&
                   BusinessComparer.Equals(x.Business, y.Business) &&
                   ContactComparer.Equals(x.Contact, y.Contact));
        }
Ejemplo n.º 3
0
        public void AlwaysFail(string left, string right)
        {
            AddressComparer addressComparer = new AddressComparer();

            Assert.False(addressComparer.Equals(left, right));
        }