public void CaptureCaptureSignalEmpty() { tlog.Debug(tag, $"CaptureCaptureSignalEmpty START"); using (Capture capture = new Capture()) { var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true); Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal"); Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type."); try { var result = testingTarget.Empty(); tlog.Debug(tag, "Empty : " + result); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); } tlog.Debug(tag, $"CaptureCaptureSignalEmpty END (OK)"); }
public void CaptureCaptureSignalConstructor() { tlog.Debug(tag, $"CaptureCaptureSignalConstructor START"); using (Capture capture = new Capture()) { var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true); Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal"); Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type."); testingTarget.Dispose(); } tlog.Debug(tag, $"CaptureCaptureSignalConstructor END (OK)"); }
public void CaptureCaptureSignalGetConnectionCount() { tlog.Debug(tag, $"CaptureCaptureSignalGetConnectionCount START"); using (Capture capture = new Capture()) { var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true); Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal"); Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type."); var result = testingTarget.GetConnectionCount(); Assert.AreEqual(0, result, "Should be equal!"); testingTarget.Dispose(); } tlog.Debug(tag, $"CaptureCaptureSignalGetConnectionCount END (OK)"); }
public void CaptureCaptureSignalEmit() { tlog.Debug(tag, $"CaptureCaptureSignalEmit START"); var currentPid = global::System.Diagnostics.Process.GetCurrentProcess().Id; var currentTid = global::System.Threading.Thread.CurrentThread.ManagedThreadId; tlog.Debug(tag, $"thread check! main pid={App.mainPid}, current pid={currentPid}, main tid={App.mainTid}, current tid={currentTid}"); using (Capture capture = new Capture()) { var testingTarget = new CaptureSignal(capture.SwigCPtr.Handle, true); Assert.IsNotNull(testingTarget, "Can't create success object CaptureSignal"); Assert.IsInstanceOf <CaptureSignal>(testingTarget, "Should be an instance of CaptureSignal type."); testingTarget.Emit(capture, true); testingTarget.Dispose(); } tlog.Debug(tag, $"CaptureCaptureSignalEmit END (OK)"); }