public void CanAssignNewTaskTipTest()
        {
            DateTime recalcTime = DateTime.Now;

            Expect.Call(acceptedTipRepository.SaveOrUpdate(null)).IgnoreArguments();

            mocks.ReplayAll();

            var service = new TaskService(taskRepository, teamTaskStateRepository, acceptedCodeRepository,
                                          acceptedBadCodeRepository, acceptedTipRepository, dispatcherFactory);

            var teamTaskState = new TeamTaskState { TeamGameState = new TeamGameState { Game = game, Team = team } };

            var tip = new Tip();
            service.AssignNewTaskTip(teamTaskState, tip, recalcTime);

            mocks.VerifyAll();

            Assert.AreEqual(1, teamTaskState.AcceptedTips.Count());
            Assert.AreEqual(recalcTime, teamTaskState.AcceptedTips[0].AcceptTime);
            Assert.AreEqual(tip, teamTaskState.AcceptedTips[0].Tip);
            Assert.AreEqual(teamTaskState, teamTaskState.AcceptedTips[0].TeamTaskState);
        }
        public void ShouldNotAssignDuodleTipTest()
        {
            DateTime recalcTime = DateTime.Now;

            DoNotExpect.Call(acceptedTipRepository.SaveOrUpdate(null));

            mocks.ReplayAll();

            var service = new TaskService(taskRepository, teamTaskStateRepository, acceptedCodeRepository,
                                          acceptedBadCodeRepository, acceptedTipRepository, dispatcherFactory);

            var teamTaskState = new TeamTaskState { TeamGameState = new TeamGameState { Game = game, Team = team } };
            var tip = new Tip { Name = "Tip 0", SuspendTime = 0 };
            teamTaskState.AcceptedTips.Add(new AcceptedTip { Tip = tip });
            service.AssignNewTaskTip(teamTaskState, tip, recalcTime);

            mocks.VerifyAll();

            Assert.AreEqual(1, teamTaskState.AcceptedTips.Count());
        }