コード例 #1
0
        public void ExternalSourceGadgetRegisters()
        {
            ExternalSourceGadgetTestData data = new ExternalSourceGadgetTestData();
            GadgetMaster target = GadgetMaster.CreateGadget(TEST_FACTORY_KEY, data.Source);

            Assert.IsTrue(target.HasExternalServerRenderControls(), "No external render controls registered");
            Assert.IsTrue(target.HasExternalServerRenderControls("home"));
            //Assert.IsFalse(target.HasExternalServerRenderControls("canvas"));

            List <IExternalDataSource> srcs = target.GetExternalServerRenderControls("home");

            Assert.AreEqual(data.ExpectedExternalControlCount, srcs.Count, "Ext control count wrong");
        }