public TestSuiteDTO AddSubTestCaseToTestSuite(string testSuiteId, TestCaseDTO instance) { TestSuite ts = TestSuite.GetTestSuite(Int32.Parse(testSuiteId)); if (ts != null) { ts.AddSubTestCase(instance.TestCaseId); return ts.ToDTO(); } else { return null; } }
public TestCaseDTO CreateTestCase(TestCaseDTO instance) { return TestCase.CreateCase(instance.ToEntity()).ToDTO(); }
public TestCaseDTO UpdateTestCase(string id, TestCaseDTO instance) { int testCaseId = Int32.Parse(id); instance.TestCaseId = testCaseId; return TestCase.Update(testCaseId, instance).ToDTO(); }
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="TestCaseDTO"/> converted from <see cref="TestCase"/>.</param> partial static void OnDTO(this TestCase entity, TestCaseDTO dto);
/// <summary> /// Converts this instance of <see cref="TestCase"/> to an instance of <see cref="TestCaseDTO"/>. /// </summary> /// <param name="entity"><see cref="TestCase"/> to convert.</param> public static TestCaseDTO ToDTO(this TestCase entity) { if (entity == null) return null; var dto = new TestCaseDTO(); dto.TestCaseId = entity.TestCaseId; dto.SourceId = entity.SourceId; dto.Name = entity.Name; dto.ProductId = entity.ProductId; dto.Feature = entity.Feature; dto.ScriptPath = entity.ScriptPath; dto.Weight = entity.Weight; dto.Ranking = entity.Ranking; dto.Release = entity.Release; dto.IsAutomated = entity.IsAutomated; dto.CreateBy = entity.CreateBy; dto.CreateTime = entity.CreateTime; dto.ModifyBy = entity.ModifyBy; dto.ModifyTime = entity.ModifyTime; dto.Description = entity.Description; entity.OnDTO(dto); return dto; }