예제 #1
0
 [Test] public void MultipleStepsAreExecuted() {
     var instructions = new Instructions()
         .MakeVariable("variable", typeof (SampleClass))
         .ExecuteMethod("samplemethod")
         .ExecuteMethod("samplemethod");
     SampleClass.MethodCount = 0;
     instructions.Execute();
     Assert.AreEqual(2, SampleClass.MethodCount);
 }
예제 #2
0
 [Test] public void ExecutesMethodOnLibraryInstance() {
     var instructions = new Instructions()
         .MakeVariable("libraryvariable", typeof (SampleClass))
         .MakeVariable("variable", typeof (DummyClass))
         .ExecuteMethod("samplemethod");
     SampleClass.MethodCount = 0;
     instructions.Execute();
     Assert.AreEqual(1, SampleClass.MethodCount);
 }
예제 #3
0
 [Test] public void StopTestExceptionSkipsRemainingSteps() {
     var instructions = new Instructions()
         .MakeVariable("variable", typeof (SampleClass))
         .ExecuteMethod("samplemethod")
         .ExecuteAbortTest()
         .ExecuteMethod("samplemethod");
     SampleClass.MethodCount = 0;
     instructions.Execute();
     Assert.AreEqual(1, SampleClass.MethodCount);
 }
예제 #4
0
 public void MultipleStepsAreExecuted()
 {
     var instructions = new Instructions()
         .MakeSampleClass()
         .ExecuteMethod("samplemethod")
         .ExecuteMethod("samplemethod");
     SampleClass.MethodCount = 0;
     instructions.Execute();
     Assert.AreEqual(2, SampleClass.MethodCount);
 }