Skip to content

Commit 9ecb8db

Browse files
committed
Clean unused functions and data structures
1 parent 707e61c commit 9ecb8db

File tree

2 files changed

+0
-83
lines changed

2 files changed

+0
-83
lines changed

src/htmltestlogger/DataType.cs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -165,51 +165,5 @@ public TestCaseDetail(string name, DateTimeOffset startTime, DateTimeOffset endT
165165
this.CapturePath = null;
166166
}
167167
}
168-
169-
/// <summary>
170-
/// Represents the summary for all test cases
171-
/// </summary>
172-
public class RunSummary
173-
{
174-
/// <summary>
175-
/// The number of total test cases
176-
/// </summary>
177-
public long TotalCount;
178-
179-
/// <summary>
180-
/// The number of passed test cases
181-
/// </summary>
182-
public long PassedCount;
183-
184-
/// <summary>
185-
/// The number of failed test cases
186-
/// </summary>
187-
public long FailedCount;
188-
189-
/// <summary>
190-
/// The number of inconclusive test cases
191-
/// </summary>
192-
public long InconclusiveCount;
193-
194-
/// <summary>
195-
/// The pass rate of this run
196-
/// </summary>
197-
public float PassRate;
198-
199-
/// <summary>
200-
/// The start time of this run
201-
/// </summary>
202-
public string StartTime;
203-
204-
/// <summary>
205-
/// The end time to of this run
206-
/// </summary>
207-
public string EndTime;
208-
209-
/// <summary>
210-
/// The duration of this run
211-
/// </summary>
212-
public string Duration;
213-
}
214168
}
215169
}

src/htmltestlogger/TxtToJSON.cs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ public class TxtToJSON
2121
// Initialize the maximum length of JSON output to 32M
2222
private JavaScriptSerializer serializer = new JavaScriptSerializer() { MaxJsonLength = 32 * 1024 * 1024 };
2323

24-
private enum LogType
25-
{
26-
None = -1,
27-
ErrorStackTrace = 1,
28-
ErrorMessage = 2,
29-
StandardOut = 3
30-
};
31-
3224
/// <summary>
3325
/// Translates List<DataType.TestCase> to DataType.TestCasesSummary string
3426
/// </summary>
@@ -62,35 +54,6 @@ public string ConstructCaseDetail(DataType.TestCaseDetail caseDetail, string cap
6254
return (serializer.Serialize(caseDetail));
6355
}
6456

65-
/// <summary>
66-
/// Gets the statistical information
67-
/// </summary>
68-
/// <param name="totalCasesNum">The number of total cases</param>
69-
/// <param name="passedNum">The number of passed cases</param>
70-
/// <param name="failedNum">The number of failed cases</param>
71-
/// <param name="testRunStartTime">The start time of the run</param>
72-
/// <param name="testRunEndTime">The end time of the run</param>
73-
/// <returns>Return statistical information about this test</returns>
74-
public string SummaryTable(long totalCasesNum,
75-
long passedNum,
76-
long failedNum,
77-
DateTimeOffset testRunStartTime,
78-
DateTimeOffset testRunEndTime)
79-
{
80-
DataType.RunSummary sry = new DataType.RunSummary()
81-
{
82-
TotalCount = totalCasesNum,
83-
FailedCount = failedNum,
84-
PassedCount = passedNum,
85-
InconclusiveCount = totalCasesNum - passedNum - failedNum,
86-
PassRate = totalCasesNum == 0 ? 0 : (float)passedNum * 100 / totalCasesNum,
87-
StartTime = testRunStartTime.ToLocalTime().ToString("MM/dd/yyyy HH:mm:ss"),
88-
EndTime = testRunEndTime.ToLocalTime().ToString("MM/dd/yyyy HH:mm:ss"),
89-
Duration = testRunEndTime.Subtract(testRunStartTime).ToString(@"hh\:mm\:ss")
90-
};
91-
return (serializer.Serialize(sry));
92-
}
93-
9457
/// <summary>
9558
/// Gets the test case list with basic information
9659
/// </summary>

0 commit comments

Comments
 (0)