Пример #1
0
        public ElectStateContextMock()
        {
            StateContextValue   = new StateContextMock();
            CandidateStateValue = new Mock <IState>().Object;
            CurrentStateValue   = "OldState";

            _context = new Lazy <ElectStateContext>(
                () => new ElectStateContext(
                    StateContextValue.Object,
                    CandidateStateValue,
                    CurrentStateValue));
        }
Пример #2
0
        public ApplyStateContextMock()
        {
            StateContextValue = new StateContextMock();
            NewStateValue     = new Mock <IState>().Object;
            OldStateValue     = null;

            _context = new Lazy <ApplyStateContext>(
                () => new ApplyStateContext(
                    StateContextValue.Object,
                    NewStateValue,
                    OldStateValue));
        }
Пример #3
0
        public ElectStateContextMock()
        {
            StateContextValue = new StateContextMock();
            CandidateStateValue = new Mock<IState>().Object;
            CurrentStateValue = "OldState";

            _context = new Lazy<ElectStateContext>(
                () => new ElectStateContext(
                    StateContextValue.Object, 
                    CandidateStateValue,
                    CurrentStateValue));
        }
Пример #4
0
        public ApplyStateContextMock()
        {
            StateContextValue = new StateContextMock();
            NewStateValue = new Mock<IState>().Object;
            OldStateValue = null;

            _context = new Lazy<ApplyStateContext>(
                () => new ApplyStateContext(
                    StateContextValue.Object,
                    NewStateValue,
                    OldStateValue));
        }
Пример #5
0
        public ApplyStateContextMock()
        {
            StateContextValue    = new StateContextMock();
            NewStateValue        = new Mock <IState>().Object;
            OldStateValue        = null;
            TraversedStatesValue = Enumerable.Empty <IState>();

            _context = new Lazy <ApplyStateContext>(
                () => new ApplyStateContext(
                    StateContextValue.Object,
                    NewStateValue,
                    OldStateValue,
                    TraversedStatesValue));
        }
Пример #6
0
        public ApplyStateContextMock()
        {
            StateContextValue = new StateContextMock();
            NewStateValue = new Mock<IState>().Object;
            OldStateValue = null;
            TraversedStatesValue = Enumerable.Empty<IState>();

            _context = new Lazy<ApplyStateContext>(
                () => new ApplyStateContext(
                    StateContextValue.Object,
                    NewStateValue,
                    OldStateValue,
                    TraversedStatesValue));
        }