コード例 #1
0
        public void GetTest()
        {
            var store = StoreSelector.Get(DefaultStoreId.ToString());

            Assert.IsNotNull(store);
            Assert.IsTrue(store.ManagerEmail.Equals("*****@*****.**"));
            Assert.IsTrue(store.WebSiteUrl.Equals("http://www.test.com/"));
        }
コード例 #2
0
        public void GetTest_NotFoundException()
        {
            var store = StoreSelector.Get(Guid.NewGuid().ToString());

            Assert.IsNotNull(store);
            Assert.IsTrue(store.ManagerEmail.Equals("*****@*****.**"));
            Assert.IsTrue(store.WebSiteUrl.Equals("http://www.test.com/"));
        }
コード例 #3
0
        void BindStores()
        {
            List <Store> storeList = Store.GetStoreList();

            StoreSelector.DataSource     = storeList;
            StoreSelector.DataTextField  = "Name";
            StoreSelector.DataValueField = "StoreID";
            StoreSelector.DataBind();

            StoreSelector.SelectedValue = SelectedStoreId.ToString();
        }
コード例 #4
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));
        }
コード例 #5
0
 public void FindAll_NoValidEmailAndWeb()
 {
     Assert.IsTrue(StoreSelector.FindAll(true).Count == ACTIVE_STORES, $"Actual is {StoreSelector.FindAll(true).Count}");
     Assert.IsTrue(StoreSelector.FindAll(false).Count == NON_ACTIVE_STORES, $"Actual is {StoreSelector.FindAll(false).Count}");
 }