Esempio n. 1
0
        public void UpdateTest()
        {
            string name  = "Clearwater, FL";
            var    store = StoreSelector.Get(DefaultStoreId);

            Assert.IsFalse(store.Name.Equals(name));
            store.SetName(name);
            StoreUpdator.Update(store);
            store = StoreSelector.Get(DefaultStoreId);
            Assert.IsTrue(store.Name.Equals(name));
        }
Esempio n. 2
0
        public void CreateTest_NotValidUrl()
        {
            SamplerOptions samplerOptions = new SamplerOptions();

            samplerOptions.PropertyDefaults.Add(new PropertiesSettings
            {
                PropertyValue = "www.asdf",
                PropertyName  = nameof(Store.WebSiteUrl)
            }, SamplerOptions.Options.DefaultValue);

            samplerOptions.PropertyOptions.Add(nameof(Store.ManagerEmail), SamplerOptions.Options.NullValue);
            List <Store> stores = SamplerServices <Store> .CreateSampleData(1, samplerOptions);

            stores.ForEach(t => t.Activate());
            stores.ForEach(t => StoreUpdator.Create(t));
        }
Esempio n. 3
0
        public void CreateTest()
        {
            SamplerOptions samplerOptions = new SamplerOptions();

            samplerOptions.PropertyDefaults.Add(new PropertiesSettings
            {
                PropertyValue = "http://www.test.com/",
                PropertyName  = nameof(Store.WebSiteUrl)
            }, SamplerOptions.Options.DefaultValue);

            samplerOptions.PropertyDefaults.Add(new PropertiesSettings
            {
                PropertyValue = "*****@*****.**",
                PropertyName  = nameof(Store.ManagerEmail)
            }, SamplerOptions.Options.DefaultValue);


            List <Store> stores = SamplerServices <Store> .CreateSampleData(1, samplerOptions);

            stores.ForEach(t => t.Activate());
            stores.ForEach(t => StoreUpdator.Create(t));
        }
Esempio n. 4
0
 public void DeleteTest()
 {
     StoreUpdator.Delete(DefaultStoreId);
 }