public void LoadsOperatorByName() { var operators = new CellOperators(); operators.Add("ParseDate"); operators.Do<ParseOperator<Cell>>(o => (o is ParseDate), o => {}); Assert.IsTrue(true, "no exception"); }
[Test] public void FindsWrapOperator() { var operators = new CellOperators(); var result = operators.FindOperator <WrapOperator>(new object[] { null }); Assert.AreEqual(typeof(WrapDefault), result.GetType()); }
[Test] public void LoadsOperatorByName() { var operators = new CellOperators(); operators.Add("ParseDate"); operators.Do <ParseOperator <Cell> >(o => (o is ParseDate), o => {}); Assert.IsTrue(true, "no exception"); }
protected CellProcessorBase(Configuration configuration, CellOperators operators) : base(configuration) { TestStatus = new TestStatus(); this.operators = operators; operators.Processor = this; AddMemory <Symbol>(); AddMemory <Procedure>(); }
public CellProcessorBase(Memory memory, CellOperators operators) : base(memory) { TestStatus = new TestStatus(); CallStack = new CallStack(); this.operators = operators; operators.Processor = this; Memory.GetItem <Symbols>(); Memory.GetItem <Procedures>(); }
[Test] public void AddedFirstGetsExecutedFirst() { var operators = new CellOperators(); var registered = operators.AddFirst("fitsharp.Test.NUnit.Fit.TestOperator"); ParseOperator <Cell> executed = null; operators.Do <ParseOperator <Cell> >(o => true, o => { executed = o; }); Assert.AreSame(registered, executed); }
public CellProcessorBase(Memory memory, CellOperators operators) : base(memory) { TestStatus = new TestStatus(); CallStack = new CallStack(); this.operators = operators; operators.Processor = this; Memory.GetItem <Symbols>(); Memory.GetItem <Procedures>(); ApplicationUnderTest.AddNamespace("fitSharp.Fit.Fixtures"); }
public CellProcessorBase(Memory memory, CellOperators operators) : base(memory) { TestStatus = new TestStatus(); CallStack = new CallStack(); this.operators = operators; operators.Processor = this; Memory.GetItem <Symbols>(); Memory.GetItem <Procedures>(); Memory.Add(new FitEnvironment(this)); Memory.ItemOf <FitEnvironment>().RunTest = new RunTestDefault(); ApplicationUnderTest.AddNamespace("fitSharp.Fit.Fixtures"); }
public void FindsWrapOperator() { var operators = new CellOperators(); var result = operators.FindOperator<WrapOperator>(new object[] {null}); Assert.AreEqual(typeof(WrapDefault), result.GetType()); }