Esempio n. 1
0
    public void OnExit_SetsProcessNull()
    {
        IPointerDownInputProcessStateConstArg arg   = CreateMockArg();
        TestAbsPointerDownInputProcessState   state = new TestAbsPointerDownInputProcessState(arg);

        state.SetProcess(Substitute.For <IUIAdaptorInputProcess>());
        Assert.That(state.GetProcess_Test(), Is.Not.Null);

        state.OnExit();

        Assert.That(state.GetProcess_Test(), Is.Null);
    }
Esempio n. 2
0
    public void OnExit_ProcessIsNotRunning_DoesNotStopIt()
    {
        IPointerDownInputProcessStateConstArg arg   = CreateMockArg();
        TestAbsPointerDownInputProcessState   state = new TestAbsPointerDownInputProcessState(arg);
        IUIAdaptorInputProcess process = Substitute.For <IUIAdaptorInputProcess>();

        process.IsRunning().Returns(false);
        state.SetProcess(process);

        state.OnExit();

        process.DidNotReceive().Stop();
    }