Skip to content

Instantly share code, notes, and snippets.

@Romiko
Created August 1, 2014 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Romiko/bc9da01ad53516ccfd2f to your computer and use it in GitHub Desktop.
Save Romiko/bc9da01ad53516ccfd2f to your computer and use it in GitHub Desktop.
PowerScribe Status
private void ReportChanged(string siteName, string accessionNumbers, int radWhereReportStatus, bool isaddendum, string plaintext, string richtext)
{
Logger.Debug("Report {0} Site:{1} AccessionNumber: {2} Status: {3}", ReportEvent.Changed, siteName, accessionNumbers, (RadWhereReportStatus)radWhereReportStatus);
if (PowerscribeStatus.UnknownOrPending == (PowerscribeStatus)radWhereReportStatus)
return;
Hub.Publish(HubEvents.DictationSystem.PSInterop.ReportChanged);
}
[Test]
public void ShouldRaiseReportClosedEvent()
{
// arrange
var wasCalled = false;
Hub.Subscribe<OnReportData>(HubEvents.DictationSystem.PSInterop.ReportClosed, a =>
{
wasCalled = true;
}, "Foo");
var radWhereCom = Substitute.For<IMyRadWhereCom>();
var ps = new Powerscribe360(radWhereCom);
// act
ps.RadWhereCom.ReportClosed += Raise.Event<RWC_ReportClosedHandler>(
"mySite", "myaccessionNumber", (int)PowerscribeStatus.Draft, false, "Some Text", "Some Rich Text");
// assert
Assert.IsTrue(wasCalled);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment