Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AutotestResult.c
Go to the documentation of this file.
1
4class SCR_AutotestResult : TestResultBase
5{
6 protected bool m_bIsSuccess;
7 protected string m_sFailureReason;
8
9 //------------------------------------------------------------------------------------------------
12 static SCR_AutotestResult AsSuccess()
13 {
14 SCR_AutotestResult result = new SCR_AutotestResult(true);
15 return result;
16 }
17
18 //------------------------------------------------------------------------------------------------
25 static SCR_AutotestResult AsFailure(string reason, string param1 = "", string param2 = "", string param3 = "")
26 {
27 SCR_AutotestResult result = new SCR_AutotestResult(false, string.Format(reason, param1, param2, param3));
28 return result;
29 }
30
31 //------------------------------------------------------------------------------------------------
34 {
35 return m_sFailureReason;
36 }
37
38 //------------------------------------------------------------------------------------------------
41 override bool Failure()
42 {
43 return !m_bIsSuccess;
44 }
45
46 //------------------------------------------------------------------------------------------------
48 override string FailureText()
49 {
50 return string.Format(
51 "<failure type=\"Result\">%1</failure>",
52 TestHarness.EscapeForXml(m_sFailureReason)
53 );
54 }
55
56 //------------------------------------------------------------------------------------------------
57 // Private constructor enforces usage of static factory methods for instantiation.
58 private void SCR_AutotestResult(bool isSuccess, string reason = "")
59 {
60 m_bIsSuccess = isSuccess;
62 }
63}
override bool Failure()
string GetFailureReason()
Plain failure text.
static SCR_AutotestResult AsFailure(string reason, string param1="", string param2="", string param3="")
static SCR_AutotestResult AsSuccess()
override string FailureText()
Text used for xml report output.
Collection of suites and main interface of the Testing framework.
Definition TestHarness.c:14
T3 param3
Definition tuple.c:93
T2 param2
Definition tuple.c:92
Tuple param1