コード例 #1
0
        public void TwoEmptyItemCatalogsTheSameShouldBeEqual()
        {
            var itemCatalog1 = new ItemCatalog();
            var itemCatalog2 = new ItemCatalog();

            itemCatalog1.Should().Equal(itemCatalog2);
        }
コード例 #2
0
        public void TwoDifferentItemCatalogsShouldNotBeEqual()
        {
            var itemCatalog1 = new ItemCatalog()
            {
                { new ItemCode("A"), new Money(50) }
            };
            var itemCatalog2 = new ItemCatalog()
            {
                { new ItemCode("B"), new Money(30) }
            };

            itemCatalog1.Should().NotEqual(itemCatalog2);
        }
コード例 #3
0
        public void TwoItemCatalogsTheSameShouldBeEqual()
        {
            var itemCatalog1 = new ItemCatalog()
            {
                { new ItemCode("A"), new Money(50) }
            };
            var itemCatalog2 = new ItemCatalog()
            {
                { new ItemCode("A"), new Money(50) }
            };

            itemCatalog1.Should().Equal(itemCatalog2);
        }