public void SettersTest1() { tlog.Debug(tag, $"SettersTest1 START"); try { XamlStyle t2 = new XamlStyle(typeof(View)); Assert.IsNotNull(t2, "null XamlStyle"); Assert.AreEqual(0, t2.Setters.Count, "Should be equal"); } catch (Exception e) { Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"SettersTest1 END"); }
public void TargetTypeTest1() { tlog.Debug(tag, $"TargetTypeTest1 START"); try { Type type = typeof(View); XamlStyle t2 = new XamlStyle(type); Assert.IsNotNull(t2, "null XamlStyle"); Assert.AreEqual(type, t2.TargetType, "Should be equal"); } catch (Exception e) { Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"TargetTypeTest1 END"); }
public void ClassTest1() { tlog.Debug(tag, $"ClassTest1 START"); try { XamlStyle t2 = new XamlStyle(typeof(View)); Assert.IsNotNull(t2, "null XamlStyle"); t2.Class = "baseStyle"; Assert.AreEqual("baseStyle", t2.Class, "Should be equal"); } catch (Exception e) { Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"ClassTest1 END"); }
public void BasedOnTest1() { tlog.Debug(tag, $"BasedOnTest1 START"); try { XamlStyle t1 = new XamlStyle(typeof(View)); Assert.IsNotNull(t1, "null XamlStyle"); XamlStyle t2 = new XamlStyle(typeof(ImageView)); t2.BasedOn = t1; Assert.AreEqual(t1, t2.BasedOn, "Should be equal"); } catch (Exception e) { Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"BasedOnTest1 END"); }
public void XamlStyleConstructor() { tlog.Debug(tag, $"XamlStyleConstructor START"); try { XamlStyle t2 = new XamlStyle(typeof(View)); Assert.IsNotNull(t2, "null XamlStyle"); Assert.IsInstanceOf <XamlStyle>(t2, "Should return XamlStyle instance."); } catch (Exception e) { Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"XamlStyleConstructor END"); }
public void CanCascadeTest1() { tlog.Debug(tag, $"CanCascadeTest1 START"); try { XamlStyle t2 = new XamlStyle(typeof(View)); Assert.IsNotNull(t2, "null XamlStyle"); t2.CanCascade = true; Assert.AreEqual(true, t2.CanCascade, "Should be equal"); t2.CanCascade = false; Assert.AreEqual(false, t2.CanCascade, "Should be equal"); } catch (Exception e) { Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"CanCascadeTest1 END"); }
public void CanBeAppliedTo() { tlog.Debug(tag, $"CanBeAppliedTo START"); try { View view = new View(); Assert.IsNotNull(view, "null View"); var style = new XamlStyle(typeof(View)); style.CanBeAppliedTo(typeof(View)); style.CanBeAppliedTo(typeof(TextLabel)); } catch (Exception e) { Assert.Fail("Caught Exception" + e.ToString()); } tlog.Debug(tag, $"CanBeAppliedTo END"); }
internal override void OnSetStyles() { XamlStyle?.Set(this); }
public override void OnSetStyles() { XamlStyle?.Set(this); }