Esempio n. 1
0
        public async void DeleteSkills_Delete_Id_3()
        {
            var query = new SkillsController(context);

            var result = await query.DeleteSkills(3);  // async

            Assert.Equal("ASP.NET", result.Value.Name);
        }
Esempio n. 2
0
        public async void DeleteSkills_Returns_OK()
        {
            var query = new SkillsController(context);

            var result = await query.DeleteSkills(3);  // async

            Assert.IsType <ActionResult <Skills> >(result);
        }
Esempio n. 3
0
        public void DeleteSkillTest()
        {
            SkillsController  skillcontroller = new SkillsController();
            SkillSet          skill           = GetLastSkill();
            IHttpActionResult response        = skillcontroller.DeleteSkills(skill.Skillid);
            var contentResult = response as OkNegotiatedContentResult <string>;

            Assert.IsNotNull(contentResult);
            Assert.IsNotNull(contentResult.Content);
            Assert.AreEqual(contentResult.Content.ToString(), "Success");
        }