Exemplo n.º 1
0
        public void LogMvtResultsTaskSectionTest_IsTaskNameExists_AddCheckTrue()
        {
            var section = new LogMvtResultsTaskSection();
            var task    = new LogMvtResultsTask("task1", "", "", null, false, 1);
            var task1   = new LogMvtResultsTask("task1", "", "", null, false, 2);

            section.TaskCollection.AddOrUpdate(task);
            Assert.IsTrue(section.IsTaskNameExists(task1));
        }
Exemplo n.º 2
0
        public void IsTaskNameExists_CheckSameIdTask_ReturnsFalse()
        {
            var section = new LogMvtResultsTaskSection();
            var task    = new LogMvtResultsTask("task1", "", "", null, false, 1); //tasks contains same id, so regards as update instead of add.

            section.TaskCollection.AddOrUpdate(task);

            Assert.IsFalse(section.IsTaskNameExists(task));
        }