public void SetupTest()
        {
            viewer = new Person {
                Id = vUid.ToString(), DisplayName = vname
            };
            context = new DataContext();
            OsViewerRequest vreq = new OsViewerRequest();

            vreq.Key = "Viewer";
            context.RegisterDataItem(vreq);
            AccountTestData.ResolveDataControlValues(context, viewer, viewer, null);
        }
Exemple #2
0
        public void TestDataItemParse()
        {
            RootElementMaster root   = new RootElementMaster(TEST_FACTORY_KEY);
            DataScript        target = new DataScript(DataScriptBlockData.Source, null, root);

            //DataContext dc = target.My. .MyDataContext;
            DataContext dc = target.MyRootMaster.MasterDataContext;

            Assert.IsNotNull(dc, "Data context is null");

            OsViewerRequest vreq = target.Controls[0] as OsViewerRequest;

            Assert.IsNotNull(vreq, "ViewerRequest is null");
            Assert.IsFalse(String.IsNullOrEmpty(vreq.Key), "ViewerRequest key is null");
            Assert.AreEqual("foo", vreq.Key, "Incorrect key on ViewerRequest");
        }
Exemple #3
0
        public void NonDynamicParamHasNoDynamicKeysTest()
        {
            OsViewerRequest target = new OsViewerRequest(controlStatic);

            Assert.AreEqual(0, target.GetDynamicKeyDependencies().Length);
        }
Exemple #4
0
        public void NonDynamicParamTest()
        {
            OsViewerRequest target = new OsViewerRequest(controlStatic);

            Assert.IsFalse(target.HasDynamicParameters());
        }
Exemple #5
0
        public void StaticControlKeyTest()
        {
            OsViewerRequest target = new OsViewerRequest(controlStatic);

            Assert.AreEqual("vwr", target.Key);
        }