Esempio n. 1
0
        public async void CreateOne()
        {
            ServiceTask newTask = new ServiceTask
            {
                Closed      = false,
                TargetId    = 13,
                Description = "Find this",
                Criticality = TaskCriticality.Critical
            };
            IServiceTaskService serviceTaskService = new ServiceTaskService();

            await serviceTaskService.CreateAsync(newTask);

            var sts = (await serviceTaskService.GetAsync(13)).ToList();

            Assert.NotEmpty(sts);
            foreach (var st in sts)
            {
                if (st.Description == "Find this")
                {
                    Assert.False(st.Closed);
                    Assert.Equal(TaskCriticality.Critical, st.Criticality);
                    return;
                }
            }
            Assert.Equal(0, 1);
        }
Esempio n. 2
0
        public async void NonExistingTasksForTarget()
        {
            IServiceTaskService serviceTaskService = new ServiceTaskService();
            int fdId = 1;

            var sts = (await serviceTaskService.GetAsync(fdId)).ToList();

            Assert.Empty(sts);
        }
Esempio n. 3
0
        public async void ExistingTasksForTarget()
        {
            IServiceTaskService serviceTaskService = new ServiceTaskService();
            int fdId = 11;

            var sts = (await serviceTaskService.GetAsync(fdId)).ToList();

            Assert.NotNull(sts);
            Assert.Equal(2, sts.Count);
        }