public void TemplateBindingConstructor() { tlog.Debug(tag, $"TemplateBindingConstructor START"); var testingTarget = new TemplateBinding("{Binding template}"); Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding."); Assert.IsInstanceOf <TemplateBinding>(testingTarget, "Should return TemplateBinding instance."); tlog.Debug(tag, $"TemplateBindingConstructor END"); }
public void ConverterParameter() { tlog.Debug(tag, $"ConverterParameter START"); var testingTarget = new TemplateBinding("{Binding template}"); Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding."); var ret = testingTarget.ConverterParameter; testingTarget.ConverterParameter = ret; tlog.Debug(tag, $"ConverterParameter END"); }
public void Apply3() { tlog.Debug(tag, $"Apply3 START"); try{ var testingTarget = new TemplateBinding("{Binding template}"); testingTarget.Apply(null, null, View.FocusableProperty); //InvalidOperationException } catch (InvalidOperationException e) { Assert.True(true, "Catch exception: " + e.Message.ToString()); } tlog.Debug(tag, $"Apply3 END"); }
public void Path() { tlog.Debug(tag, $"Path START"); var testingTarget = new TemplateBinding("{Binding template}"); Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding."); var ret = testingTarget.Path; testingTarget.Path = ret; tlog.Debug(tag, $"Path END"); }
public void Clone() { tlog.Debug(tag, $"Clone START"); try { var testingTarget = new TemplateBinding("{Binding template}"); Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding."); testingTarget.Clone(); } catch (Exception e) { Assert.Fail("Catch exception: " + e.Message.ToString()); } tlog.Debug(tag, $"Clone END"); }
public void Apply2() { tlog.Debug(tag, $"Apply2 START"); try { var testingTarget = new TemplateBinding("{Binding template}"); Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding."); testingTarget.Apply(null, new View(), View.FocusableProperty); } catch (Exception e) { Assert.Fail("Catch exception: " + e.Message.ToString()); } tlog.Debug(tag, $"Apply2 END"); }
public void GetSourceValue() { tlog.Debug(tag, $"GetSourceValue START"); try { var testingTarget = new TemplateBinding("{Binding template}"); Assert.IsNotNull(testingTarget, "Can't create success object TemplateBinding."); testingTarget.GetSourceValue(null, typeof(bool)); testingTarget.GetTargetValue(null, typeof(bool)); } catch (Exception e) { Assert.Fail("Catch exception: " + e.Message.ToString()); } tlog.Debug(tag, $"GetSourceValue END"); }
protected override void OnEnabled() { targetScript = (TemplateBinding)target; _templatesProperty = serializedObject.FindProperty("_templates"); }
private void OnEnable() { targetScript = (TemplateBinding)target; }