public TestSuiteDTO AddSubTestSuiteToTestSuite(string testSuiteId, TestSuiteDTO instance) { TestSuite ts = TestSuite.GetTestSuite(Int32.Parse(testSuiteId)); if (ts != null) { ts.AddSubTestSuite(instance.SuiteId); return ts.ToDTO(); } else { return null; } }
public TestSuiteDTO CreateTestSuite(TestSuiteDTO instance) { return TestSuite.CreateSuite(instance.ToEntity()).ToDTO(); }
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="TestSuiteDTO"/> converted from <see cref="TestSuite"/>.</param> partial static void OnDTO(this TestSuite entity, TestSuiteDTO dto);
public TestSuiteDTO UpdateTestSuite(string id, TestSuiteDTO instance) { int testSuiteId = Int32.Parse(id); instance.SuiteId = testSuiteId; return TestSuite.Update(testSuiteId, instance).ToDTO(); }
/// <summary> /// Converts this instance of <see cref="TestSuite"/> to an instance of <see cref="TestSuiteDTO"/>. /// </summary> /// <param name="entity"><see cref="TestSuite"/> to convert.</param> public static TestSuiteDTO ToDTO(this TestSuite entity) { if (entity == null) return null; var dto = new TestSuiteDTO(); dto.SuiteId = entity.SuiteId; dto.Name = entity.Name; dto.SubSuites = entity.SubSuites; dto.TestCases = entity.TestCases; dto.CreateBy = entity.CreateBy; dto.CreateTime = entity.CreateTime; dto.ModityBy = entity.ModityBy; dto.ModifyTime = entity.ModifyTime; dto.Description = entity.Description; dto.Type = entity.Type; dto.ExecutionCommand = entity.ExecutionCommand; entity.OnDTO(dto); return dto; }