public void ApplyPropertiesVisitorVisit2() { tlog.Debug(tag, $"ApplyPropertiesVisitorVisit2 START"); try { HydrationContext context = new HydrationContext(); object o1 = new object(); INodeImpl nodeImplement = new INodeImpl(); Assert.IsNotNull(nodeImplement, "null INodeImplement"); IList <XmlType> list = null; XmlType xmlType = new XmlType("myNameSpace", "myName", list); Assert.IsNotNull(xmlType, "null XmlType"); IXmlNamespaceResolverImplement ix1 = new IXmlNamespaceResolverImplement(); Assert.IsNotNull(ix1, "null IXmlNamespaceResolverImplement"); ElementNode n1 = new ElementNode(xmlType, "myNameSpace", ix1); Assert.IsNotNull(n1, "null ElementNode"); context.Values[n1] = o1; context.Values[nodeImplement] = o1; ApplyPropertiesVisitor a2 = new ApplyPropertiesVisitor(context, false); Assert.IsNotNull(a2, "null ApplyPropertiesVisitor"); a2.Visit(n1, nodeImplement); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"ApplyPropertiesVisitorVisit2 END"); }
public void ApplyPropertiesVisitorVisit1() { tlog.Debug(tag, $"ApplyPropertiesVisitorVisit1 START"); try { HydrationContext context = new HydrationContext(); object o1 = new object(); IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement(); Assert.IsNotNull(i1, "null IXmlNamespaceResolverImplement"); ValueNode valueNode = new ValueNode(o1, i1); Assert.IsNotNull(valueNode, "null ValueNode"); INodeImpl nodeImplement = new INodeImpl(); Assert.IsNotNull(nodeImplement, "null INodeImplement"); context.Values[valueNode] = o1; context.Values[nodeImplement] = o1; ApplyPropertiesVisitor a2 = new ApplyPropertiesVisitor(context, false); Assert.IsNotNull(a2, "null ApplyPropertiesVisitor"); a2.Visit(valueNode, nodeImplement); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"ApplyPropertiesVisitorVisit1 END"); }
public void XamlServiceProviderTargetProperty() { tlog.Debug(tag, $"XamlServiceProviderTargetProperty START"); try { object o1 = new object(); INodeImpl node = new INodeImpl(); HydrationContext hydrationContext = new HydrationContext(); object o2 = new object(); var testingTarget = new XamlValueTargetProvider(o1, node, hydrationContext, o2); Assert.IsNotNull(testingTarget, "null XamlValueTargetProvider"); Assert.IsInstanceOf <XamlValueTargetProvider>(testingTarget, "Should return XamlValueTargetProvider instance."); object object1 = testingTarget.TargetProperty; testingTarget.TargetProperty = object1; Assert.AreEqual(object1, testingTarget.TargetProperty, "Should be equal"); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } tlog.Debug(tag, $"XamlServiceProviderTargetProperty END"); }
public void ApplyPropertiesVisitorIsCollectionItem() { tlog.Debug(tag, $"ApplyPropertiesVisitorIsCollectionItem START"); try { INodeImpl n1 = new INodeImpl(); Assert.IsNotNull(n1, "null INodeImplement"); INodeImpl n2 = new INodeImpl(); Assert.IsNotNull(n2, "null INodeImplement"); ApplyPropertiesVisitor.IsCollectionItem(n1, n2); } catch (Exception e) { Tizen.Log.Error(tag, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"ApplyPropertiesVisitorIsCollectionItem END"); }
public void ApplyPropertiesVisitorTryGetPropertyName() { tlog.Debug(tag, $"ApplyPropertiesVisitorTryGetPropertyName START"); try { INodeImpl n1 = new INodeImpl(); Assert.IsNotNull(n1, "null INodeImplement"); INodeImpl n2 = new INodeImpl(); Assert.IsNotNull(n2, "null INodeImplement"); XmlName xmlName = new XmlName(); Assert.IsNotNull(xmlName, "null XmlName"); ApplyPropertiesVisitor.TryGetPropertyName(n1, n2, out xmlName); } catch (Exception e) { Tizen.Log.Error(tag, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"ApplyPropertiesVisitorTryGetPropertyName END"); }
public void ExpandMarkupsVisitorVisit() { tlog.Debug(tag, $"ExpandMarkupsVisitorVisit START"); try { IXmlNamespaceResolverImplement i1 = new IXmlNamespaceResolverImplement(); Assert.IsNotNull(i1, "null IXmlNamespaceResolverImplement"); MarkupNode markupnode = new MarkupNode("markup", i1); Assert.IsNotNull(markupnode, "null MarkupNode"); INodeImpl parentNode = new INodeImpl(); Assert.IsNotNull(parentNode, "null INodeImplement"); visitor.Visit(markupnode, parentNode); } catch (Exception e) { Tizen.Log.Error(tag, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"ExpandMarkupsVisitorVisit END"); }
public void NamescopingVisitorSkipChildren() { tlog.Debug(tag, $"NamescopingVisitorSkipChildren START"); try { var child = new INodeImpl(); Assert.IsNotNull(child, "null INodeImpl object."); var parent = new INodeImpl(); Assert.IsNotNull(parent, "null INodeImpl object."); var result = visitor.SkipChildren(child, parent); tlog.Debug(tag, "SkipChildren : " + result); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } tlog.Debug(tag, $"NamescopingVisitorSkipChildren END"); }