public FluencyConfiguration()
 {
     // Initialize default values.
     ConstructIdGenerator    = () => new StaticValueIdGenerator(0);
     DefaultValueConventions = new List <IDefaultConvention>
     {
         // Strings
         Convention.ByName("Firstname", p => ARandom.FirstName()),
         Convention.ByName("LastName", p => ARandom.LastName()),
         Convention.ByName("FullName", p => ARandom.FullName()),
         Convention.ByName("City", p => ARandom.City()),
         Convention.ByName("State", p => ARandom.StateCode()),
         Convention.ByName("Zip", p => ARandom.ZipCode()),
         Convention.ByName("ZipCode", p => ARandom.ZipCode()),
         Convention.ByName("PostalCode", p => ARandom.ZipCode()),
         Convention.ByName("Email", p => ARandom.Email()),
         Convention.ByName("Address", p => String.Format("{0} {1} {2}",
                                                         ARandom.IntBetween(10, 9999),
                                                         ARandom.LastName(),
                                                         ARandom.ItemFrom("Street", "Lane", "Ave.", "Blvd."))),
         Convention.ByName("Phone", p => ARandom.StringPattern("999-999-9999")),
         Convention.ByName("HomePhone", p => ARandom.StringPattern("999-999-9999")),
         Convention.ByName("WorkPhone", p => ARandom.StringPattern("999-999-9999")),
         Convention.ByName("BusinessPhone", p => ARandom.StringPattern("999-999-9999")),
         Convention.ByName("Fax", p => ARandom.StringPattern("999-999-9999")),
         Convention.String(20),
         // Dates
         Convention.ByName("BirthDate", p => ARandom.BirthDate()),
         Convention.DateType(),
         Convention.IntegerType(),
         Convention.ByType <Decimal>(p => ARandom.CurrencyAmount())
     };
 }
 public AnonymousManufacturerBuilder()
 {
     SetProperty(x => x.Id, ARandom.IntBetween(100000, int.MaxValue));
     SetProperty(x => x.Name, "Test_" + ARandom.Text(100).TrimEnd());
     SetProperty(x => x.Test, true);
     SetProperty(x => x.CreatedDttm, ARandom.DateTimeInPast());
     SetProperty(x => x.UpdatedDttm, ARandom.DateTimeInPast());
     SetProperty(x => x.DeletedDttm, (DateTime?)null);
 }
Example #3
0
        public void UpdateCustomer_with_nulls_saves_all_data_correctly()
        {
            var customer = new Customer();

            customer.StoreId  = ARandom.IntBetween(1000000, int.MaxValue);
            customer.LastName = ARandom.LastName();
            customer.Email    = "archive+" + ARandom.StringFromCharacterSet(15, "abcdefghijklmnopqrstuvwxyz").TrimEnd() + "@animatomusic.be";
            customer.Test     = true;

            //save the customer to the webshop
            string result = WebMethods.CustomerMethods.UpdateCustomer(customer);

            result = XElement.Parse(result).Value;

            Assert.IsTrue(result == "ok",
                          string.Format("Customer with store_id {0} could not be created/updated. Unexpected return value was: {1}", customer.StoreId, result));

            //retrieve the customer from the webshop
            string   errorMsg;
            Customer customerFromWS = WebMethods.CustomerMethods.GetCustomerByStoreId((int)customer.StoreId, out errorMsg);

            //compare all values
            Assert.AreEqual(customer.StoreId, customerFromWS.StoreId, "The field comparison for field \"store_id\" failed.");
            Assert.AreEqual(customer.LastName, customerFromWS.LastName, "The field comparison for field \"last_name\" failed.");
            Assert.AreEqual(customer.FirstName, customerFromWS.FirstName, "The field comparison for field \"first_name\" failed.");
            Assert.AreEqual(customer.ShippingAddressStreet, customerFromWS.ShippingAddressStreet, "The field comparison for field \"shipping_address_street\" failed.");
            Assert.AreEqual(customer.ShippingAddressHomeNumber, customerFromWS.ShippingAddressHomeNumber, "The field comparison for field \"shipping_address_home_number\" failed.");
            Assert.AreEqual(customer.ShippingAddressZip, customerFromWS.ShippingAddressZip, "The field comparison for field \"shipping_address_zip\" failed.");
            Assert.AreEqual(customer.ShippingAddressCity, customerFromWS.ShippingAddressCity, "The field comparison for field \"shipping_address_city\" failed.");
            Assert.AreEqual(customer.ShippingAddressCountry, customerFromWS.ShippingAddressCountry, "The field comparison for field \"shipping_address_country\" failed.");
            Assert.AreEqual(customer.Phone, customerFromWS.Phone, "The field comparison for field \"phone\" failed.");
            Assert.AreEqual(customer.Mobile, customerFromWS.Mobile, "The field comparison for field \"mobile\" failed.");
            Assert.AreEqual(customer.Email, customerFromWS.Email, "The field comparison for field \"email\" failed.");
            Assert.AreEqual(customer.BillingName, customerFromWS.BillingName, "The field comparison for field \"billing_name\" failed.");
            Assert.AreEqual(customer.BillingContact, customerFromWS.BillingContact, "The field comparison for field \"billing_contact\" failed.");
            Assert.AreEqual(customer.BillingAddress1, customerFromWS.BillingAddress1, "The field comparison for field \"billing_address1\" failed.");
            Assert.AreEqual(customer.BillingAddress2, customerFromWS.BillingAddress2, "The field comparison for field \"billing_address2\" failed.");
            Assert.AreEqual(customer.BillingAddress3, customerFromWS.BillingAddress3, "The field comparison for field \"billing_address3\" failed.");
            Assert.AreEqual(customer.VatNumber, customerFromWS.VatNumber, "The field comparison for field \"vat_number\" failed.");
            Assert.AreEqual(customer.WebshopDiscount6, customerFromWS.WebshopDiscount6, "The field comparison for field \"std_discount_for_tax_rate_id1\" failed.");
            Assert.AreEqual(customer.WebshopDiscount21, customerFromWS.WebshopDiscount21, "The field comparison for field \"std_discount_for_tax_rate_id2\" failed.");
            Assert.AreEqual(customer.IsTeacher, customerFromWS.IsTeacher, "The field comparison for field \"is_teacher\" failed.");
            Assert.AreEqual(customer.IsReseller, customerFromWS.IsReseller, "The field comparison for field \"is_reseller\" failed.");
            Assert.AreEqual(customer.Institution, customerFromWS.Institution, "The field comparison for field \"institution\" failed.");
            Assert.AreEqual(customer.TeachingSubjects, customerFromWS.TeachingSubjects, "The field comparison for field \"teaching_subjects\" failed.");
            Assert.AreEqual(customer.TeacherCardNumber, customerFromWS.TeacherCardNumber, "The field comparison for field \"card_number\" failed.");
            Assert.AreEqual(customer.TeacherCardValidFrom, customerFromWS.TeacherCardValidFrom, "The field comparison for field \"card_valid_from\" failed.");
            Assert.AreEqual(customer.TeacherCardValidTo, customerFromWS.TeacherCardValidTo, "The field comparison for field \"card_valid_to\" failed.");
            Assert.AreEqual(customer.TeacherRegistrationNote, customerFromWS.TeacherRegistrationNote, "The field comparison for field \"teacher_registration_note\" failed.");
            Assert.AreEqual(customer.TeacherConfirmed, customerFromWS.TeacherConfirmed, "The field comparison for field \"teacher_confirmed\" failed.");
            Assert.AreEqual(customer.LastLoginDttm, customerFromWS.LastLoginDttm, "The field comparison for field \"last_login\" failed.");
            Assert.AreEqual(customer.Test, customerFromWS.Test, "The field comparison for field \"test\" failed.");
            //CreatedDttm and UpdateDttm should not be compared, because upon creation of a customer in the webshop, both fields will be set if no value is provided
            //Assert.AreEqual(customer.CreatedDttm, customerFromWS.CreatedDttm, "The field comparison for field \"created\" failed.");
            //Assert.AreEqual(customer.UpdatedDttm, customerFromWS.UpdatedDttm, "The field comparison for field \"updated\" failed.");
            Assert.AreEqual(customer.DeletedDttm, customerFromWS.DeletedDttm, "The field comparison for field \"deleted\" failed.");
        }
Example #4
0
        private void InitializeObject(bool UseValidLookupValues)
        {
            var pdo = new PredefinedDataObjects();

            SetProperty(x => x.Id, ARandom.IntBetween(1000000, int.MaxValue));
            SetProperty(x => x.Sequence, ARandom.PositiveInt());
            SetProperty(x => x.Title, "Test_" + ARandom.Text(200).TrimEnd());
            SetProperty(x => x.AuthorId, UseValidLookupValues ? pdo.Author.Id : ARandom.PositiveInt());
            SetProperty(x => x.Test, true);
        }
 public AnonymousSupplierBuilder()
 {
     SetProperty(x => x.Id, ARandom.IntBetween(100000, int.MaxValue));
     SetProperty(x => x.Name, "Test_" + ARandom.Text(50).TrimEnd());
     SetProperty(x => x.MinimumDeliveryDays, ARandom.PositiveInt());
     SetProperty(x => x.MaximumDeliveryDays, ARandom.PositiveInt());
     SetProperty(x => x.Test, true);
     SetProperty(x => x.CreatedDttm, ARandom.DateTimeInPast());
     SetProperty(x => x.UpdatedDttm, ARandom.DateTimeInPast());
     SetProperty(x => x.DeletedDttm, (DateTime?)null);
 }
Example #6
0
 public LineItem LineItem()
 {
     return(new LineItem
     {
         Id = GetUniqueId(),
         Order = Order(),
         Product = Product(),
         Quantity = ARandom.IntBetween(1, 10),
         UnitPrice = ARandom.DoubleBetween(1, 100)
     });
 }
Example #7
0
        private void InitializeObject(bool useValidLookupValues)
        {
            SetProperty(x => x.LogBits, new ProductLogBits());
            SetProperty(x => x.Id, ARandom.IntBetween(1000000, 2000000));
            SetProperty(x => x.ProductTypeId, (Enums.ProductType)ARandom.IntBetween(1, 2));
            SetProperty(x => x.ActiveInWebshop, ARandom.Boolean());
            SetProperty(x => x.Name_NL, "Test_" + ARandom.Text(200).TrimEnd());
            SetProperty(x => x.Name_EN, "Test_" + ARandom.Text(200).TrimEnd());
            SetProperty(x => x.Subtitle_NL, ARandom.Text(300).TrimEnd());
            SetProperty(x => x.ReferenceNumber, ARandom.Text(20).TrimEnd());
            SetProperty(x => x.Isbn, ARandom.String(13));
            SetProperty(x => x.Ismn, ARandom.String(13));
            SetProperty(x => x.Ean, ARandom.String(13));
            SetProperty(x => x.Upc, ARandom.String(12));
            SetProperty(x => x.GradeLevel, ARandom.String(10));
            SetProperty(x => x.Pages, ARandom.IntBetween(1, Int16.MaxValue));
            SetProperty(x => x.SalesPrice, ARandom.CurrencyAmountLessThan(100000));
            SetProperty(x => x.TaxRateId, (Enums.TaxRate)ARandom.IntBetween(1, 2));
            SetProperty(x => x.Description_NL, ARandom.Text(500).TrimEnd());
            SetProperty(x => x.Weight, ARandom.CurrencyAmountLessThan(100));
            SetProperty(x => x.Length, ARandom.CurrencyAmountLessThan(100));
            SetProperty(x => x.Width, ARandom.CurrencyAmountLessThan(100));
            SetProperty(x => x.Height, ARandom.CurrencyAmountLessThan(100));
            SetProperty(x => x.InternalStock, ARandom.PositiveInt());
            SetProperty(x => x.ExternalStock, ARandom.PositiveInt());
            SetProperty(x => x.TeacherDiscount, (byte)ARandom.IntBetween(0, 100));
            SetProperty(x => x.ResellerDiscount, (byte)ARandom.IntBetween(0, 100));
            SetProperty(x => x.Promotion, ARandom.Boolean());
            SetProperty(x => x.HighlightOnHome, ARandom.Boolean());
            //TODO: set Besteller property to ARandom.Boolean() when BestSeller is properly supported
            SetProperty(x => x.BestSeller, false);
            SetProperty(x => x.MinimumOrderQuantity, ARandom.IntBetween(1, 500));
            SetProperty(x => x.SearchKeywords, ARandom.Text(200));
            SetProperty(x => x.StorePickupOnly, ARandom.Boolean());
            SetProperty(x => x.Test, true);
            SetProperty(x => x.CreatedDttm, ARandom.DateTimeInPast());
            SetProperty(x => x.UpdatedDttm, ARandom.DateTimeInPast());
            SetProperty(x => x.DeletedDttm, (DateTime?)null);

            SetProperty(x => x.Songs, GetRandomSonglist(5, useValidLookupValues));
            SetProperty(x => x.ProductPictures, GetRandomProductPictures(5));
            SetProperty(x => x.ProductCategories, GetRandomProductCategories(5, useValidLookupValues));

            var pdo = new PredefinedDataObjects();

            SetProperty(x => x.AuthorId, useValidLookupValues ? pdo.Author.Id : ARandom.PositiveInt());
            SetProperty(x => x.ArrangerId, useValidLookupValues ? pdo.Author.Id : ARandom.PositiveInt());
            SetProperty(x => x.SupplierId, useValidLookupValues ? pdo.Supplier.Id : ARandom.PositiveInt());
            SetProperty(x => x.ManufacturerId, useValidLookupValues ? pdo.Manufacturer.Id : ARandom.PositiveInt());
            SetProperty(x => x.InstrumentId, useValidLookupValues ? pdo.Instrument.Id : ARandom.PositiveInt());
            SetProperty(x => x.LanguageId, ARandom.EnumValue <Enums.Language>());
            SetProperty(x => x.BindingId, useValidLookupValues ? pdo.Binding.Id : ARandom.PositiveInt());
            SetProperty(x => x.SeriesId, useValidLookupValues ? pdo.ProductSeries.Id : ARandom.PositiveInt());
        }
Example #8
0
            public void should_return_mostly_unique_values()
            {
                BlockingCollection <int> values = new BlockingCollection <int>();

                Parallel.For(0, 100,
                             new ParallelOptions {
                    MaxDegreeOfParallelism = 10
                },
                             (i, loop) => values.Add(ARandom.IntBetween(int.MinValue, int.MaxValue)));

                // Allow for occasional duplicate
                values.Distinct().Count().Should().BeInRange(99, 100);
            }
        public T GetOutcome()
        {
            int random = ARandom.IntBetween(1, 100);

            // Determine which chance's percentile the random number falls in to and return its outcome.
            int threshold = 0;

            foreach (var outcome in _outcomes)
            {
                threshold += outcome.PercentChance;

                if (random <= threshold)
                {
                    return(outcome.Outcome);
                }
            }

            // No outcomes matched, return default value for the type.
            return(default(T));
        }
Example #10
0
            public void should_eventually_generate_the_min_and_max_value()
            {
                var generatedMin = false;
                var generatedMax = false;

                while (!generatedMin || !generatedMax)
                {
                    var result = ARandom.IntBetween(1, 3);
                    if (result == 1)
                    {
                        generatedMin = true;
                    }
                    if (result == 3)
                    {
                        generatedMax = true;
                    }
                }

                generatedMin.Should().BeTrue();
                generatedMax.Should().BeTrue();
            }
Example #11
0
        private void InitializeObject(bool UseValidLookupValues)
        {
            string appPath       = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            string imagePath     = appPath + @"\Resources\testcategory.jpg";
            string imageFileName = Path.GetFileName(imagePath);

            var pdo = new PredefinedDataObjects();

            SetProperty(x => x.Id, ARandom.IntBetween(10000, 20000));
            SetProperty(x => x.ParentId, UseValidLookupValues ? pdo.ProductCategory.Id : ARandom.IntBetween(10000, 20000));
            SetProperty(x => x.SortOrder, ARandom.IntBetween(1, 100));
            SetProperty(x => x.Name, "Test_" + ARandom.Text(50).TrimEnd());
            SetProperty(x => x.PictureFilename, imageFileName);
            SetProperty(x => x.PictureData, Utility.LoadImageFromFile(imagePath));
            SetProperty(x => x.ProductCount, ARandom.PositiveInt());
            SetProperty(x => x.TargetUrl, ARandom.String(100));
            SetProperty(x => x.Path, ARandom.String(100));
            SetProperty(x => x.Test, true);
            SetProperty(x => x.CreatedDttm, ARandom.DateTimeInPast());
            SetProperty(x => x.UpdatedDttm, ARandom.DateTimeInPast());
            SetProperty(x => x.DeletedDttm, (DateTime?)null);
        }
 public AnonymousCustomerBuilder()
 {
     SetProperty(x => x.StoreId, ARandom.IntBetween(1000000, int.MaxValue));
     //SetProperty(x => x.WebshopId, ARandom.IntBetween(1000000, int.MaxValue));
     SetProperty(x => x.LastName, "Test_" + ARandom.LastName());
     SetProperty(x => x.FirstName, "Test_" + ARandom.FirstName());
     SetProperty(x => x.ShippingAddressStreet, "Test_" + ARandom.Text(15).TrimEnd());
     SetProperty(x => x.ShippingAddressHomeNumber, ARandom.Text(5).TrimEnd());
     SetProperty(x => x.ShippingAddressCity, ARandom.City());
     SetProperty(x => x.ShippingAddressZip, ARandom.ZipCode());
     SetProperty(x => x.ShippingAddressState, "");
     SetProperty(x => x.ShippingAddressCountryId, (int?)ARandom.EnumValue <Enums.Country>());
     SetProperty(x => x.ShippingAddressCountry, Enum.GetName(typeof(Enums.Country), ARandom.EnumValue <Enums.Country>()));
     SetProperty(x => x.Phone, ARandom.StringPattern("##/### ## ##"));
     SetProperty(x => x.Mobile, ARandom.StringPattern("####/## ## ##"));
     SetProperty(x => x.Email, "archive+" + ARandom.StringFromCharacterSet(15, "abcdefghijklmnopqrstuvwxyz").TrimEnd() + "@animatomusic.be");
     SetProperty(x => x.BillingAddress1, ARandom.Text(15).TrimEnd());
     SetProperty(x => x.BillingAddress2, ARandom.Text(15).TrimEnd());
     SetProperty(x => x.BillingAddress3, ARandom.Text(15).TrimEnd());
     SetProperty(x => x.BillingName, ARandom.Text(30).TrimEnd());
     SetProperty(x => x.BillingContact, ARandom.Text(30).TrimEnd());
     SetProperty(x => x.VatNumber, ARandom.Text(15).TrimEnd());
     SetProperty(x => x.WebshopDiscount6, (byte)ARandom.IntBetween(0, 100));
     SetProperty(x => x.WebshopDiscount21, (byte)ARandom.IntBetween(0, 100));
     SetProperty(x => x.IsTeacher, ARandom.Boolean());
     SetProperty(x => x.IsReseller, ARandom.Boolean());
     SetProperty(x => x.Institution, ARandom.Text(50).TrimEnd());
     SetProperty(x => x.TeacherCardNumber, "17511240450-000010");
     SetProperty(x => x.TeacherCardValidFrom, ARandom.DateAfter(DateTime.Today));
     SetProperty(x => x.TeacherCardValidTo, ARandom.DateAfter(DateTime.Today));
     SetProperty(x => x.TeacherRegistrationNote, ARandom.Text(150).TrimEnd());
     SetProperty(x => x.TeacherConfirmed, ARandom.DateTime());
     SetProperty(x => x.TeachingSubjects, ARandom.Text(50).TrimEnd());
     SetProperty(x => x.Test, true);
     SetProperty(x => x.CreatedDttm, ARandom.DateTimeInPast());
     SetProperty(x => x.UpdatedDttm, ARandom.DateTimeInPast());
     SetProperty(x => x.DeletedDttm, (DateTime?)null);
 }
Example #13
0
 public void should_accept_a_very_low_max_value() =>
 ARandom.IntBetween(Int32.MinValue, Int32.MinValue + 1).Should().BeLessOrEqualTo(Int32.MinValue + 1);
        public void UpdateProduct_with_nulls_saves_all_data_correctly()
        {
            Product product = new Product();

            product.Id            = ARandom.IntBetween(1000000, 2000000);
            product.ProductTypeId = (Enums.ProductType)ARandom.IntBetween(1, 2);
            product.TaxRateId     = (Enums.TaxRate)ARandom.IntBetween(1, 2);
            product.SupplierId    = new PredefinedDataObjects().Supplier.Id;
            product.InternalStock = 0;
            product.ExternalStock = 1;
            product.SalesPrice    = 0;
            product.ProductCategories.Add(new PredefinedDataObjects().ProductCategory);
            //the following line causes the LogBits to be set properly
            product.ProductCategories = product.ProductCategories;
            product.Test = true;
            Console.WriteLine("product.Id = {0}", product.Id);

            //save the product to the webshop
            string result = WebMethods.ProductMethods.UpdateProduct(product);

            result = XElement.Parse(result).Value;

            Assert.IsTrue(result == "ok", string.Format("Product with id {0} could not be created/updated. Unexpected return value was: {1}", product.Id, result));

            //retrieve the product from the webshop
            string  errorMsg;
            Product productFromWS = WebMethods.ProductMethods.GetProductById(product.Id, out errorMsg);

            Assert.IsNotNull(productFromWS, string.Format("Could not retrieve product with id {0} from the webshop. Unexpected return value was: {1}", product.Id, errorMsg));

            //compare all values
            Assert.AreEqual(product.Id, productFromWS.Id, "The field comparison for field \"id\" failed.");
            Assert.AreEqual(product.ProductTypeId, productFromWS.ProductTypeId, "The field comparison for field \"product_type_id\" failed.");
            Assert.AreEqual(product.Name_NL, productFromWS.Name_NL, "The field comparison for field \"name_nl\" failed.");
            //Assert.AreEqual(product.Name_EN, productFromWS.Name_EN, "The field comparison for field \"name_en\" failed.");
            Assert.AreEqual(product.Subtitle_NL, productFromWS.Subtitle_NL, "The field comparison for field \"subtitle_nl\" failed.");
            Assert.AreEqual(product.AuthorId, productFromWS.AuthorId, "The field comparison for field \"author_id\" failed.");
            Assert.AreEqual(product.ArrangerId, productFromWS.ArrangerId);
            Assert.AreEqual(product.ManufacturerId, productFromWS.ManufacturerId, "The field comparison for field \"manufacturer_id\" failed.");
            Assert.AreEqual(product.InstrumentId, productFromWS.InstrumentId, "The field comparison for field \"instrument_id\" failed.");
            Assert.AreEqual(product.ReferenceNumber, productFromWS.ReferenceNumber, "The field comparison for field \"reference\" failed.");
            Assert.AreEqual(product.Isbn, productFromWS.Isbn, "The field comparison for field \"isbn\" failed.");
            Assert.AreEqual(product.Ismn, productFromWS.Ismn, "The field comparison for field \"ismn\" failed.");
            Assert.AreEqual(product.Ean, productFromWS.Ean, "The field comparison for field \"ean\" failed.");
            Assert.AreEqual(product.Upc, productFromWS.Upc, "The field comparison for field \"upc\" failed.");
            Assert.AreEqual(product.LanguageId, productFromWS.LanguageId, "The field comparison for field \"language_id\" failed.");
            Assert.AreEqual(product.BindingId, productFromWS.BindingId, "The field comparison for field \"binding_id\" failed.");
            Assert.AreEqual(product.GradeLevel, productFromWS.GradeLevel, "The field comparison for field \"grade_level\" failed.");
            Assert.AreEqual(product.SeriesId, productFromWS.SeriesId, "The field comparison for field \"product_series_id\" failed.");
            Assert.AreEqual(product.Pages, productFromWS.Pages, "The field comparison for field \"nr_of_pages\" failed.");
            Assert.AreEqual(product.SalesPrice, productFromWS.SalesPrice, "The field comparison for field \"sales_price\" failed.");
            Assert.AreEqual(product.TaxRateId, productFromWS.TaxRateId, "The field comparison for field \"tax_rate_id\" failed.");
            Assert.AreEqual(product.Description_NL, productFromWS.Description_NL, "The field comparison for field \"description_nl\" failed.");
            Assert.AreEqual(product.Weight, productFromWS.Weight, "The field comparison for field \"weight\" failed.");
            Assert.AreEqual(product.Length, productFromWS.Length, "The field comparison for field \"length\" failed.");
            Assert.AreEqual(product.Width, productFromWS.Width, "The field comparison for field \"width\" failed.");
            Assert.AreEqual(product.Height, productFromWS.Height, "The field comparison for field \"height\" failed.");
            Assert.AreEqual(product.InternalStock, productFromWS.InternalStock, "The field comparison for field \"internal_stock\" failed.");
            Assert.AreEqual(product.ExternalStock, productFromWS.ExternalStock, "The field comparison for field \"external_stok\" failed.");
            Assert.AreEqual(product.SupplierId, productFromWS.SupplierId, "The field comparison for field \"supplier_id\" failed.");
            Assert.AreEqual(product.Promotion, productFromWS.Promotion, "The field comparison for field \"promotion\" failed.");
            Assert.AreEqual(product.HighlightOnHome, productFromWS.HighlightOnHome, "The field comparison for field \"highlight_on_home\" failed.");
            Assert.AreEqual(product.BestSeller, productFromWS.BestSeller, "The field comparison for field \"bestseller\" failed.");
            Assert.AreEqual(product.MinimumOrderQuantity, productFromWS.MinimumOrderQuantity);
            Assert.AreEqual(product.TeacherDiscount, productFromWS.TeacherDiscount, "The field comparison for field \"teacher_discount\" failed.");
            Assert.AreEqual(product.ResellerDiscount, productFromWS.ResellerDiscount, "The field comparison for field \"reseller_discount\" failed.");
            Assert.AreEqual(product.SearchKeywords, productFromWS.SearchKeywords, "The field comparison for field \"keywords_nl\" failed.");
            Assert.AreEqual(product.StorePickupOnly, productFromWS.StorePickupOnly, "The field comparison for field \"store_pickup_only\" failed.");
            //Assert.AreEqual(product.CreatedDttm, productFromWS.CreatedDttm, "The field comparison for field \"created\" failed.");
            Assert.AreEqual(product.UpdatedDttm, productFromWS.UpdatedDttm, "The field comparison for field \"updated\" failed.");
            Assert.AreEqual(product.DeletedDttm, productFromWS.DeletedDttm, "The field comparison for field \"deleted\" failed.");

            //compare lists
            Assert.AreEqual(product.Songs.Count, productFromWS.Songs.Count, "The field comparison for field \"songs\" failed.");
            Assert.AreEqual(product.ProductPictures.Count, productFromWS.ProductPictures.Count, "The field comparison for field \"product_pictures\" failed.");
            Assert.AreEqual(product.ProductCategories.Count, productFromWS.ProductCategories.Count, "The field comparison for field \"product_categories\" failed.");
        }
Example #15
0
 public void should_fail_if_min_is_greater_than_max() =>
 Catch.Exception(() => ARandom.IntBetween(10, 0)).Should().BeOfType <ArgumentException>();
Example #16
0
 public void should_accept_a_very_high_min_value() =>
 ARandom.IntBetween(Int32.MaxValue - 1, Int32.MaxValue).Should().BeGreaterOrEqualTo(Int32.MaxValue - 1);
Example #17
0
 public void when_given_that_same_min_and_max_value_it_should_generate_that_number() =>
 ARandom.IntBetween(3, 3).Should().Be(3);
Example #18
0
 public void should_generate_value_less_than_or_equal_to_max_value() =>
 ARandom.IntBetween(1, 3).Should().BeLessOrEqualTo(3);
Example #19
0
 public void should_generate_value_greater_than_or_equal_to_min_value() =>
 ARandom.IntBetween(1, 3).Should().BeGreaterOrEqualTo(1);