Beispiel #1
0
        public void account_tags_are_not_equal_if_id_is_different()
        {
            var accountTag1 = new AccountTag(1, "Food");
            var accountTag2 = new AccountTag(2, "Food");

            Assert.IsFalse(accountTag1.Equals(accountTag2));
            Assert.IsFalse(accountTag1 == accountTag2);
            Assert.AreNotEqual(accountTag1, accountTag2);
            Assert.AreNotSame(accountTag1, accountTag2);
        }
Beispiel #2
0
        public void account_tags_are_equal__when_id_is_equal()
        {
            var accountTag1 = new AccountTag(2, "Food");
            var accountTag2 = new AccountTag(2, "Bonanza");

            Assert.IsTrue(accountTag1.Equals(accountTag2));
            Assert.IsTrue(accountTag1 == accountTag2);
            Assert.AreEqual(accountTag1, accountTag2);
            Assert.AreNotSame(accountTag1, accountTag2);
        }