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); }
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"); }
public void NonDynamicParamHasNoDynamicKeysTest() { OsViewerRequest target = new OsViewerRequest(controlStatic); Assert.AreEqual(0, target.GetDynamicKeyDependencies().Length); }
public void NonDynamicParamTest() { OsViewerRequest target = new OsViewerRequest(controlStatic); Assert.IsFalse(target.HasDynamicParameters()); }
public void StaticControlKeyTest() { OsViewerRequest target = new OsViewerRequest(controlStatic); Assert.AreEqual("vwr", target.Key); }