Esempio n. 1
0
        public void ViewRegistrationGetMaskMatches(string viewsToRegister)
        {
            RootElementMaster target = new RootElementMaster(TEST_FACTORY_KEY);
            int result = target.RegisterViews(viewsToRegister);

            Assert.AreEqual(result, target.GetViewMask(viewsToRegister));
        }
Esempio n. 2
0
        public void ViewsGetIntMask(string viewsToRegister, string viewsToTest, int expectedResult)
        {
            RootElementMaster target = new RootElementMaster(TEST_FACTORY_KEY);

            target.RegisterViews(viewsToRegister);
            int result = target.GetViewMask(viewsToTest);

            Assert.AreEqual(expectedResult, result);
        }
Esempio n. 3
0
        public void ScopedExternalRenderControlsFiltered(string registeredView, string scopedView, bool expectedFound)
        {
            RootElementMaster target = new RootElementMaster(TEST_FACTORY_KEY);

            target.RegisterViews(registeredView);
            OsGet ctl = new OsGet();

            ctl.LoadTag("<os:Get src='http://www.lolcats.com' resolver='server' />");

            target.Controls.Add(ctl);
            target.RegisterExternalServerRenderControl(ctl, target.GetViewMask(registeredView));

            List <IExternalDataSource> sources = target.GetExternalServerRenderControls(scopedView);

            Assert.IsNotNull(sources);
            Assert.AreEqual(expectedFound, sources.Count > 0, "Sources not filtered");
        }