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

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

            AddMemory <Symbol>();
            AddMemory <Procedure>();
        }
예제 #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);
        }
예제 #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");
        }
예제 #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");
        }
예제 #9
0
 public void FindsWrapOperator()
 {
     var operators = new CellOperators();
     var result = operators.FindOperator<WrapOperator>(new object[] {null});
     Assert.AreEqual(typeof(WrapDefault), result.GetType());
 }