public void ToastDuration() { tlog.Debug(tag, $"ToastDuration START"); var testingTarget = new MyToast(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <Toast>(testingTarget, "Should return Toast instance."); testingTarget.OnInitialize(); testingTarget.Duration = 10; tlog.Debug(tag, "Duration : " + testingTarget.Duration); testingTarget.TextLineSpace = 8; tlog.Debug(tag, "testingTarget : " + testingTarget.TextLineSpace); testingTarget.TextLineHeight = 15; tlog.Debug(tag, "TextLineHeight : " + testingTarget.TextLineHeight); testingTarget.TextPadding = new Extents(2, 2, 2, 2); tlog.Debug(tag, "TextPadding : " + testingTarget.TextPadding); testingTarget.Message = "Toast"; tlog.Debug(tag, "Message : " + testingTarget.Message); testingTarget.TextAlignment = HorizontalAlignment.Center; tlog.Debug(tag, "TextAlignment :" + testingTarget.TextAlignment); testingTarget.TextArray = new string[2] { "microsoft", "perfomance" }; tlog.Debug(tag, "TextArray : " + testingTarget.TextArray); testingTarget.PointSize = 15.0f; tlog.Debug(tag, "PointSize : " + testingTarget.PointSize); testingTarget.FontFamily = "BreezeSans"; tlog.Debug(tag, "FontFamily : " + testingTarget.FontFamily); testingTarget.TextColor = Color.Yellow; tlog.Debug(tag, "TextColor : " + testingTarget.TextColor); try { testingTarget.Post(Window.Instance); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"ToastDuration END (OK)"); }
public void ToastCreateViewStyle() { tlog.Debug(tag, $"ToastCreateViewStyle START"); var testingTarget = new MyToast(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <Toast>(testingTarget, "Should return Toast instance."); try { testingTarget.OnCreateViewStyle(); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"ToastCreateViewStyle END (OK)"); }