Esempio n. 1
0
 public void Routing_Redirect()
 {
     var storeVM = new TestBookStoreVM();
      var route = storeVM.Redirect("musics", "music/25");
      Assert.IsNotNull(route);
      Assert.AreEqual("musics", route.RedirectRoot);
      Assert.AreEqual("music/25", route.Path);
 }
Esempio n. 2
0
        public void Routing_Redirect()
        {
            var storeVM = new TestBookStoreVM();
            var route   = storeVM.Redirect("musics", "music/25");

            Assert.IsNotNull(route);
            Assert.AreEqual("musics", route.RedirectRoot);
            Assert.AreEqual("music/25", route.Path);
        }
Esempio n. 3
0
        public void Routing_GetRoute()
        {
            var navVM = new TestNavBarVM();
             var route = navVM.GetRoute("Books");
             Assert.IsNotNull(route);
             Assert.AreEqual("books", route.Path);

             var storeVM = new TestBookStoreVM();
             route = storeVM.GetRoute("Category");
             Assert.IsNotNull(route);
             Assert.AreEqual("category(/:name)", route.Path);

             route = storeVM.GetRoute("Book");
             Assert.IsNotNull(route);
             Assert.AreEqual("book(/:title)(/:tab)", route.Path);
        }
Esempio n. 4
0
        public void Routing_GetRoute()
        {
            var navVM = new TestNavBarVM();
            var route = navVM.GetRoute("Books");

            Assert.IsNotNull(route);
            Assert.AreEqual("books", route.Path);

            var storeVM = new TestBookStoreVM();

            route = storeVM.GetRoute("Category");
            Assert.IsNotNull(route);
            Assert.AreEqual("category(/:name)", route.Path);

            route = storeVM.GetRoute("Book");
            Assert.IsNotNull(route);
            Assert.AreEqual("book(/:title)(/:tab)", route.Path);
        }