Example #1
0
 [Test] public void ExecuteCallBadMethodReturnsException() {
     processor.Get<SavedInstances>().Save("variable", new SampleClass());
     var executeCall = new ExecuteCall { Processor = processor };
     var input = new SlimTree().AddBranchValue("step").AddBranchValue("call").AddBranchValue("variable").AddBranchValue("garbage");
     ExecuteOperation(executeCall, input, 2);
     CheckForException("message:<<NO_METHOD_IN_CLASS garbage fitSharp.Test.NUnit.Slim.SampleClass>>");
 }
Example #2
0
 public void ExecuteCallUsesDomainAdapter()
 {
     processor.Store(new SavedInstance("variable", new SampleClass()));
     var executeCall = new ExecuteCall { Processor = processor };
     var input = new SlimTree().AddBranchValue("step").AddBranchValue("call").AddBranchValue("variable").AddBranchValue("DomainMethod");
     ExecuteOperation(executeCall, input, 2);
     Assert.AreEqual("domainstuff", result.Branches[1].Value);
 }
Example #3
0
 public void ExecuteCallOnMissingInstanceUsesLibrary()
 {
     var executeMake = new ExecuteMake { Processor = processor };
     var input = new SlimTree().AddBranchValue("step").AddBranchValue("make").AddBranchValue("librarystuff").AddBranchValue("fitSharp.Test.NUnit.Slim.SampleClass");
     ExecuteOperation(executeMake, input, 2);
     var executeCall = new ExecuteCall { Processor = processor };
     input = new SlimTree().AddBranchValue("step").AddBranchValue("call").AddBranchValue("garbage").AddBranchValue("SampleMethod");
     SampleClass.MethodCount = 0;
     ExecuteOperation(executeCall, input, 2);
     Assert.AreEqual(1, SampleClass.MethodCount);
 }
Example #4
0
 private void CallActorMethod(string methodName)
 {
     var executeCall = new ExecuteCall { Processor = processor };
     var input = new SlimTree().AddBranchValue("step").AddBranchValue("call").AddBranchValue("scriptTableActor").AddBranchValue(methodName);
     ExecuteOperation(executeCall, input, 2);
 }