1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
6
namespace ICSharpCode.Scripting.Tests.Utils
8
public class TestableThreadSafeScriptingConsoleEvents : ThreadSafeScriptingConsoleEvents
10
public FakeScriptingConsole NonThreadSafeScriptingConsole;
11
public FakeControlDispatcher Dispatcher;
13
public bool IsWaitForLineCalled;
14
public bool WaitForLineReturnValue;
15
public bool DispatcherCheckAccessReturnValueAfterWaitForLineCalled;
16
public bool IsLineReceivedEventResetBeforeReadLineCalled;
17
public bool IsLineReceivedEventReset;
18
public bool IsSetDisposedEventCalled;
19
public bool IsSetLineReceivedEventCalled;
21
public override bool WaitForLine()
23
IsWaitForLineCalled = true;
24
Dispatcher.CheckAccessReturnValue = DispatcherCheckAccessReturnValueAfterWaitForLineCalled;
25
return WaitForLineReturnValue;
28
public override void ResetLineReceivedEvent()
30
IsLineReceivedEventReset = true;
31
IsLineReceivedEventResetBeforeReadLineCalled = !NonThreadSafeScriptingConsole.IsReadLineCalled;
34
public override void SetDisposedEvent()
36
IsSetDisposedEventCalled = true;
39
public override void SetLineReceivedEvent()
41
IsSetLineReceivedEventCalled = true;