001package com.thed.zblast.parser.model; 002 003import org.apache.commons.lang.StringUtils; 004 005import java.util.ArrayList; 006import java.util.HashMap; 007import java.util.List; 008import java.util.Map; 009 010public class TestSuite { 011 012 private String id; 013 private int parentId; 014 private int orderId; 015 private String name; 016 private String suitePackage; 017 private String totalTests; 018 private String description; 019 private static List<TestSuite> suiteArray = new ArrayList<TestSuite>(); 020 private static List<TestCase> testCaseArray = new ArrayList<TestCase>(); 021 private static Map<String, List<TestCase>> suiteTestCaseMap = new HashMap<String, List<TestCase>>(); 022 public String getId() { 023 return id; 024 } 025 026 public void setId(String id) { 027 this.id = id; 028 } 029 030 public int getParentId() { 031 return parentId; 032 } 033 034 public void setParentId(int parentId) { 035 this.parentId = parentId; 036 } 037 038 public int getOrderId() { 039 return orderId; 040 } 041 042 public void setOrderId(int orderId) { 043 this.orderId = orderId; 044 } 045 046 public String getName() { 047 return name; 048 } 049 050 public void setName(String name) { 051 this.name = name; 052 } 053 054 public String getTotalTests() { 055 return totalTests; 056 } 057 058 public void setTotalTests(String totalTests) { 059 this.totalTests = totalTests; 060 } 061 062 public String getSuitePackage() { 063 return suitePackage; 064 } 065 066 public void setSuitePackage(String suitePackage) { 067 String packageName = ""; 068 if (StringUtils.isBlank(suitePackage)) { 069 this.suitePackage = suitePackage; 070 } 071 072 packageName = suitePackage.replace("\\", "."); 073 this.suitePackage = packageName; 074 } 075 076 public List<TestSuite> getSuiteArray() { 077 return suiteArray; 078 } 079 080 public void setSuiteArray(TestSuite suite) { 081 suiteArray.add(suite); 082 } 083 084 public Map<String, List<TestCase>> getSuiteTestCaseMap() { 085 return suiteTestCaseMap; 086 } 087 088 public List<TestCase> getTestCaseArray() { 089 return testCaseArray; 090 } 091 092 public void setTestCaseArray(List<TestCase> testCaseArray) { 093 TestSuite.testCaseArray = testCaseArray; 094 } 095 096 public void setSuiteTestCaseMap(String suiteName, List<TestCase> finalTestCases) { 097 // TODO Auto-generated method stub 098 suiteTestCaseMap.put(suiteName, finalTestCases); 099 } 100 101 public String getDescription() { 102 return description; 103 } 104 105 public void setDescription(String description) { 106 this.description = description; 107 } 108}