14[BadInteropApi(
"Assert")]
23 [BadMethod(
"Throws",
"Asserts that the given function throws a BadRuntimeException")]
25 [BadParameter(description:
"The Function that is expected to throw")]
27 [BadParameter(description:
"The Message")]
47 [BadMethod(
"AreEqual",
"Asserts that the given objects are equal")]
49 [BadParameter(description:
"The Actual Value")]
51 [BadParameter(description:
"The Message")]
54 Assert.That(actual, Is.EqualTo(expected), message);
63 [BadMethod(
"AreNotEqual",
"Asserts that the given objects are not equal")]
65 [BadParameter(description:
"The Actual Value")]
67 [BadParameter(description:
"The Message")]
70 Assert.That(actual, Is.Not.EqualTo(expected), message);
79 [BadMethod(
"AreSame",
"Asserts that the given objects are the same")]
81 [BadParameter(description:
"The Actual Value")]
83 [BadParameter(description:
"The Message")]
86 Assert.That(actual, Is.SameAs(expected), message);
95 [BadMethod(
"AreNotSame",
"Asserts that the given objects are not the same")]
97 [BadParameter(description:
"The Actual Value")]
99 [BadParameter(description:
"The Message")]
102 Assert.That(actual, Is.Not.SameAs(expected), message);
110 [BadMethod(
"IsTrue",
"Asserts that the given condition is true")]
112 [BadParameter(description:
"The Message")] string message)
114 Assert.That(condition is
IBadBoolean { Value:
true },
125 [BadMethod(
"IsFalse",
"Asserts that the given condition is false")]
127 [BadParameter(description:
"The Message")] string message)
137 [BadMethod(
"Fail",
"Fails the test with the given message")]
138 private static void Assert_Fail([BadParameter(description:
"The Message")] string message)
140 Assert.Fail(message);
147 [BadMethod(
"Inconclusive",
"Marks the test as inconclusive with the given message")]
150 Assert.Inconclusive(message);
157 [BadMethod(
"Ignore",
"Ignore the test with the given message")]
158 private static void Assert_Ignore([BadParameter(description:
"The Message")] string message)
160 Assert.Ignore(message);
169 [BadMethod(
"IsNull",
"Asserts that the given object is null")]
171 [BadParameter(description:
"The Message")] string message)
173 Assert.That(obj, Is.Null, message);
181 [BadMethod(
"IsNotNull",
"Asserts that the given object is not null")]
183 [BadParameter(description:
"The Message")] string message)
185 Assert.That(obj, Is.Not.Null, message);
194 [BadMethod(
"Greater",
"Asserts that the given object is greater than the other object")]
195 private static void Assert_Greater([BadParameter(description:
"Actual")] decimal a,
196 [BadParameter(description:
"Expected")]
198 [BadParameter(description:
"The Message")]
201 Assert.That(a, Is.GreaterThan(b), message);
210 [BadMethod(
"GreaterOrEqual",
"Asserts that the given object is greater or equal the other object")]
212 [BadParameter(description:
"Expected")]
214 [BadParameter(description:
"The Message")]
217 Assert.That(a, Is.GreaterThanOrEqualTo(b), message);
226 [BadMethod(
"Less",
"Asserts that the given object is less than the other object")]
227 private static void Assert_Less([BadParameter(description:
"Actual")] decimal a,
228 [BadParameter(description:
"Expected")]
230 [BadParameter(description:
"The Message")]
233 Assert.That(a, Is.LessThan(b), message);
242 [BadMethod(
"LessOrEqual",
"Asserts that the given object is less or equal the other object")]
244 [BadParameter(description:
"Expected")]
246 [BadParameter(description:
"The Message")]
249 Assert.That(a, Is.LessThanOrEqualTo(b), message);
258 [BadMethod(
"Contains",
"Asserts that the given collection contains the given object")]
260 [BadParameter(description:
"The Object to Check")]
262 [BadParameter(description:
"The Message")]
265 Assert.That(collection.InnerArray, Contains.Value(obj!), message);
274 [BadMethod(
"Positive",
"Asserts that the given object is positive")]
275 private static void Assert_Positive([BadParameter(description:
"The Object to Check")] decimal d,
276 [BadParameter(description:
"The Message")] string message)
278 Assert.That(d, Is.Positive);
286 [BadMethod(
"Negative",
"Asserts that the given object is negative")]
287 private static void Assert_Negative([BadParameter(description:
"The Object to Check")] decimal d,
288 [BadParameter(description:
"The Message")] string message)
290 Assert.That(d, Is.Negative);
298 [BadMethod(
"Zero",
"Asserts that the given object is zero")]
299 private static void Assert_Zero([BadParameter(description:
"The Object to Check")] decimal d,
300 [BadParameter(description:
"The Message")] string message)
302 Assert.That(d, Is.Zero);
310 [BadMethod(
"NotZero",
"Asserts that the given object is not zero")]
311 private static void Assert_NotZero([BadParameter(description:
"The Object to Check")] decimal d,
312 [BadParameter(description:
"The Message")] string message)
314 Assert.That(d, Is.Not.Zero);
321 [BadMethod(
"Pass",
"Passes the test with the given message")]
322 private static void Assert_Pass([BadParameter(description:
"The Message")] string message)
324 Assert.Pass(message);
332 [BadMethod(
"IsEmpty",
"Asserts that the given collection is empty")]
334 [BadParameter(description:
"The Message")] string message)
336 Assert.That(collection.InnerArray, Is.Empty, message);
Implements the "NUnit" Api.
static void Assert_NotZero([BadParameter(description:"The Object to Check")] decimal d, [BadParameter(description:"The Message")] string message)
Asserts that the given object is not zero.
static void Assert_AreNotEqual([BadParameter(description:"The Expected Value")] BadObject? expected, [BadParameter(description:"The Actual Value")] BadObject? actual, [BadParameter(description:"The Message")] string message)
Asserts that the given objects are not equal.
static void Assert_AreNotSame([BadParameter(description:"The Expected Value")] BadObject? expected, [BadParameter(description:"The Actual Value")] BadObject? actual, [BadParameter(description:"The Message")] string message)
Asserts that the given objects are not the same.
static void Assert_Negative([BadParameter(description:"The Object to Check")] decimal d, [BadParameter(description:"The Message")] string message)
Asserts that the given object is negative.
static void Assert_Pass([BadParameter(description:"The Message")] string message)
Passes the test with the given message.
static void Assert_Greater([BadParameter(description:"Actual")] decimal a, [BadParameter(description:"Expected")] decimal b, [BadParameter(description:"The Message")] string message)
Asserts that the given object is greater than the other object.
static void Assert_Positive([BadParameter(description:"The Object to Check")] decimal d, [BadParameter(description:"The Message")] string message)
Asserts that the given object is positive.
static void Assert_AreEqual([BadParameter(description:"The Expected Value")] BadObject? expected, [BadParameter(description:"The Actual Value")] BadObject? actual, [BadParameter(description:"The Message")] string message)
Asserts that the given objects are equal.
static void Assert_IsEmpty([BadParameter(description:"The Collection to Check")] BadArray collection, [BadParameter(description:"The Message")] string message)
Asserts that the given collection is empty.
static void Assert_IsTrue([BadParameter(description:"The Condition to check")] BadObject? condition, [BadParameter(description:"The Message")] string message)
Asserts that the given condition is true.
static void Assert_AreSame([BadParameter(description:"The Expected Value")] BadObject? expected, [BadParameter(description:"The Actual Value")] BadObject? actual, [BadParameter(description:"The Message")] string message)
Asserts that the given objects are the same.
static void Assert_IsNull([BadParameter(description:"The Object to check")] BadObject? obj, [BadParameter(description:"The Message")] string message)
Asserts that the given object is null.
static void Assert_IsNotNull([BadParameter(description:"The Object to check")] BadObject? obj, [BadParameter(description:"The Message")] string message)
Asserts that the given object is not null.
static void Assert_Throws(BadExecutionContext ctx, [BadParameter(description:"The Function that is expected to throw")] BadFunction func, [BadParameter(description:"The Message")] string message)
Asserts that the given function throws a BadRuntimeException.
static void Assert_Inconclusive([BadParameter(description:"The Message")] string message)
Marks the test as inconclusive with the given message.
static void Assert_GreaterOrEqual([BadParameter(description:"Actual")] decimal a, [BadParameter(description:"Expected")] decimal b, [BadParameter(description:"The Message")] string message)
Asserts that the given object is greater or equal the other object.
static void Assert_Contains([BadParameter(description:"The Collection to Check")] BadArray collection, [BadParameter(description:"The Object to Check")] BadObject? obj, [BadParameter(description:"The Message")] string message)
Asserts that the given collection contains the given object.
static void Assert_Less([BadParameter(description:"Actual")] decimal a, [BadParameter(description:"Expected")] decimal b, [BadParameter(description:"The Message")] string message)
Asserts that the given object is less than the other object.
static void Assert_IsFalse([BadParameter(description:"The Condition to check")] BadObject? condition, [BadParameter(description:"The Message")] string message)
Asserts that the given condition is false.
static void Assert_Ignore([BadParameter(description:"The Message")] string message)
Ignore the test with the given message.
static void Assert_Zero([BadParameter(description:"The Object to Check")] decimal d, [BadParameter(description:"The Message")] string message)
Asserts that the given object is zero.
static void Assert_LessOrEqual([BadParameter(description:"Actual")] decimal a, [BadParameter(description:"Expected")] decimal b, [BadParameter(description:"The Message")] string message)
Asserts that the given object is less or equal the other object.
static void Assert_Fail([BadParameter(description:"The Message")] string message)
Fails the test with the given message.
The Execution Context. Every execution of a script needs a context the script is running in....
Gets thrown by the runtime.
Implements a Dynamic List/Array for the BadScript Language.
The Base Class for all BadScript Objects.
Implements a function that can be called from the script.
Implements the Interface for Native Boolean.
new bool Value
The Boolean Value.
Contains NUnit Extensions and APIs for the BadScript2 Runtime.
Contains the Error Objects for the BadScript2 Language.
Contains Runtime Function Objects.
Contains the Native Runtime Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.