示例#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));
        }