public void OverlayAnimationButtonExtensionConstructor() { tlog.Debug(tag, $"OverlayAnimationButtonExtensionConstructor START"); var testingTarget = new OverlayAnimationButtonExtension(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <OverlayAnimationButtonExtension>(testingTarget, "Should return OverlayAnimationButtonExtension instance."); try { using (Button button = new Button() { Size = new Size(80, 50) }) { using (ImageView view = new ImageView(image_path)) { testingTarget.OnCreateOverlayImage(button, view); } } } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } tlog.Debug(tag, $"OverlayAnimationButtonExtensionConstructor END (OK)"); }
public void OverlayAnimationButtonExtensionOnControlStateChanged() { tlog.Debug(tag, $"OverlayAnimationButtonExtensionOnControlStateChanged START"); var testingTarget = new OverlayAnimationButtonExtension(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <OverlayAnimationButtonExtension>(testingTarget, "Should return OverlayAnimationButtonExtension instance."); using (Button button = new Button() { Size = new Size(80, 50) }) { ControlStateChangedEventArgs args = new ControlStateChangedEventArgs(ControlState.Pressed, ControlState.Selected); try { using (ImageView view = new ImageView(image_path)) { testingTarget.OnCreateOverlayImage(button, view); testingTarget.OnControlStateChanged(button, args); testingTarget.OnDispose(button); } } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } } tlog.Debug(tag, $"OverlayAnimationButtonExtensionOnControlStateChanged END (OK)"); }