public void LoadsOperatorByName()
 {
     var operators = new CellOperators();
     operators.Add("ParseDate");
     operators.Do<ParseOperator<Cell>>(o => (o is ParseDate), o => {});
     Assert.IsTrue(true, "no exception");
 }
Beispiel #2
0
        [Test] public void FindsWrapOperator()
        {
            var operators = new CellOperators();
            var result    = operators.FindOperator <WrapOperator>(new object[] { null });

            Assert.AreEqual(typeof(WrapDefault), result.GetType());
        }
Beispiel #3
0
        [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");
        }
Beispiel #4
0
        protected CellProcessorBase(Configuration configuration, CellOperators operators) : base(configuration)
        {
            TestStatus          = new TestStatus();
            this.operators      = operators;
            operators.Processor = this;

            AddMemory <Symbol>();
            AddMemory <Procedure>();
        }
Beispiel #5
0
        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);
        }
Beispiel #7
0
        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");
        }
Beispiel #8
0
        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());
 }