Esempio n. 1
0
        public async Task Can_Delete_System_With_Task_Ref(OrganizationRole role)
        {
            //Arrange
            var login = await HttpApi.GetCookieAsync(role);

            const int organizationId = TestEnvironment.DefaultOrganizationId;
            const int taskRefId      = TestEnvironment.DefaultTaskRefId;

            var system = await ItSystemHelper.CreateItSystemInOrganizationAsync(A <string>(), organizationId, AccessModifier.Public);

            await ItSystemHelper.SendSetTaskRefOnSystemRequestAsync(system.Id, taskRefId, organizationId, login);

            //Act
            using (var result = await ItSystemHelper.DeleteItSystemAsync(system.Id, organizationId, login))
            {
                //Assert
                Assert.Equal(HttpStatusCode.OK, result.StatusCode);
                await AssertSystemDeletedAsync(system.Id);
            }
        }