예제 #1
0
        public void Should_get_prices_of_all_articles_for_price_updates()
        {
            // Arrange
            var query = new CustomerAgreementQuery(_vismaConnection);
            var articlesForPriceUpdate = new List<ArticleForPriceUpdate>
            {
                new ArticleForPriceUpdate("181", string.Empty, "DK"),
                new ArticleForPriceUpdate("110", string.Empty, "DK")
            };

            // Act
            query.PopulateNewPrice(10001, articlesForPriceUpdate);

            // Assert
            Assert.That(articlesForPriceUpdate[0].NewPrice, Is.Not.EqualTo(0));
            Assert.That(articlesForPriceUpdate[1].NewPrice, Is.Not.EqualTo(0));
        }
예제 #2
0
        public void Should_get_agreed_prices_from_visma_for_different_customers()
        {
            // Arrange
            var query = new CustomerAgreementQuery(_vismaConnection);
            const string articleNo = "100";

            // Act
            var agreedPriceForSwe = query.GetPrice(11801, articleNo);
            var agreedPriceForNor = query.GetPrice(10648, articleNo);
            var agreedPriceForDen = query.GetPrice(10048, articleNo);

            // Assert
            Assert.That(agreedPriceForSwe, Is.Not.Null);
            Assert.That(agreedPriceForNor, Is.Not.Null);
            Assert.That(agreedPriceForDen, Is.Not.Null);
            Assert.That(agreedPriceForSwe, Is.Not.EqualTo(agreedPriceForNor));
        }