public void SameIdentityAs_OfMapsWithTheSameId_ShouldBeTrue()
        {
            var productMapToCompare = new RealProductMap(_productMap.Id);

            Assert.IsTrue(
                _productMap.SameIdentityAs(productMapToCompare)
            );
        }
        public void SameIdentityAs_OfProductMapsWithDifferentId_ShouldBeFalse()
        {
            var productMapToCompare =
                new RealProductMap(new ProductMapId(Guid.NewGuid()));

            Assert.IsFalse(
                _productMap.SameIdentityAs(productMapToCompare)
            );
        }
        public void SubtractOperator_ShouldThrowException()
        {
            var productsToSubtract = new RealProductMap(new ProductMapId(Guid.NewGuid()))
            {
                Products = new Dictionary<global::Domain.Assortment.Product, int>()
                {
                    {_product1, 20}
                }
            };

            try
            {
                // ReSharper disable once UnusedVariable
                // Needed for test.
                var result = _productMap - productsToSubtract;

                throw new Exception("Unexpected success");
            }
            catch (NumberOfProductsLowerThanZeroException e)
            {
                Assert.IsNotNull(e);
            }
        }
        public void SubtractOperator_ShouldCorrectlySubtractTwoMaps()
        {
            var productsToSubtract = new RealProductMap(new ProductMapId(Guid.NewGuid()))
            {
                Products = new Dictionary<global::Domain.Assortment.Product, int>()
                {
                    {_product1, 10},
                    {_product2, 2}
                }
            };

            var result = _productMap - productsToSubtract;

            Assert.AreEqual(result[_product2], 3);
            Assert.IsFalse(result.ContainsKey(_product1));
        }
        public void TestAddOperator()
        {
            var products1 = new RealProductMap(new ProductMapId(Guid.NewGuid()))
            {
                Products = new Dictionary<global::Domain.Assortment.Product, int>()
                {
                    {_product1, 5}
                }
            };

            var products2 =
                new RealProductMap(new ProductMapId(Guid.NewGuid()))
            {
                Products = new Dictionary<global::Domain.Assortment.Product, int>()
                {
                    {_product1, 5},
                    {_product2, 5}
                }
            };

            var result = products1 + products2;

            Assert.AreEqual(result[_product1], 10);
            Assert.AreEqual(result[_product2], 5);
        }