Example #1
0
        public void ShouldEnterInsertModeFromNavigationMode()
        {
            StateMachine <State, Trigger> insertStateMachine = new StateMachine <State, Trigger>(State.NAVIGATION);

            app = new MeerkatApp(insertStateMachine, mockRepository.Object, mockDispatcher.Object);

            app.EnterInsert();

            Assert.AreEqual(State.INSERT, app.CurrentState);
        }
Example #2
0
        public void TestInitialize()
        {
            mockRepository = new Mock <IRepository <Todo> >();
            stateMachine   = new StateMachine <State, Trigger>(State.INSERT);
            mockDispatcher = new Mock <DispatcherTimer>();
            string message = "Some todo message";
            Todo   todo    = new Todo(false, message);

            todos = new List <Todo> {
                todo
            };
            mockRepository.Setup(repository => repository.Get()).Returns(todos);
            app = new MeerkatApp(stateMachine, mockRepository.Object, mockDispatcher.Object);
        }