public void GestureDetectorDownCast() { tlog.Debug(tag, $"GestureDetectorDownCast START"); BaseHandle handle = new BaseHandle(); GestureDetector ret = GestureDetector.DownCast(handle); Assert.IsNotNull(ret, "should be not null"); Assert.IsInstanceOf <GestureDetector>(ret, "should be an instance of testing target class!"); tlog.Debug(tag, $"GestureDetectorDownCast END (OK)"); Assert.Pass("GestureDetectorDownCast"); }
public void GestureDetectorDownCast() { tlog.Debug(tag, $"GestureDetectorDownCast START"); using (GestureDetector detector = new GestureDetector()) { var testingTarget = GestureDetector.DownCast(detector); Assert.IsInstanceOf <GestureDetector>(testingTarget, "should be an instance of testing target class!"); testingTarget.Dispose(); } tlog.Debug(tag, $"GestureDetectorDownCast END (OK)"); Assert.Pass("GestureDetectorDownCast"); }