public void HasTestCaseCreated()
        {
            var newTestCase = new TestCase
            {
                Cases = 1
            };

            var testCaseBl = new TestCaseBL();

            testCaseBl.CreateTestCase(newTestCase);
            Assert.IsTrue(newTestCase.Id > 0);
        }
Example #2
0
        public IHttpActionResult PostTestCase(TestCase testCase)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var testCaseBl = new TestCaseBL();

            testCaseBl.CreateTestCase(testCase);

            return(CreatedAtRoute("DefaultApi", new { id = testCase.Id }, testCase));
        }