コード例 #1
0
    public void ExpireProcess_ProcessIsNotRunning_DoesNotCallItExpire()
    {
        IPointerUpInputProcessStateConstArg arg   = CreateMockArg();
        TestAbsPointerUpInputProcessState   state = new TestAbsPointerUpInputProcessState(arg);
        IUIAdaptorInputProcess process            = Substitute.For <IUIAdaptorInputProcess>();

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

        state.ExpireProcess();

        process.DidNotReceive().Expire();
    }
コード例 #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();
    }