public void OnGet(int width = 2, int height = 4)
 {
     Input = new DataInputModel();
     for (int i = 0; i < width; i++)
     {
         Input.Data.Add(new List <int>());
         for (int j = 0; j < height; j++)
         {
             Input.Data[i].Add(0);
         }
     }
 }
Esempio n. 2
0
        public void RegisterDataInput()
        {
            LemonTransform.RegisterDataInput <FakeDataInput>("fakedb");

            var model = new DataInputModel
            {
                SourceType = "fakedb",
                ObjectName = "landing.office_365_threads",
                Connection = "mongodb://localhost:27017",
                Filter     = "{}"
            };

            var factory = new DataInputOutputFactory();

            var input = factory.CreateDataInput(model);

            Assert.AreEqual(typeof(FakeDataInput), input.GetType());
        }
Esempio n. 3
0
        public void RegisterDataInput()
        {
            LemonTransform.RegisterDataInput<FakeDataInput>("fakedb");

            var model = new DataInputModel
            {
                SourceType = "fakedb",
                ObjectName = "landing.office_365_threads",
                Connection = "mongodb://localhost:27017",
                Filter = "{}"
            };

            var factory = new DataInputOutputFactory();

            var input = factory.CreateDataInput(model);

            Assert.AreEqual(typeof(FakeDataInput), input.GetType());
        }
Esempio n. 4
0
        public void InputTest001()
        {
            var model = new DataInputModel
            {
                SourceType = "mongo",
                ObjectName = "landing.office_365_threads",
                Connection = "mongodb://localhost:27017",
                Filter = "{}"
            };

            var dataInput = new MongoDataInput(model);

            var index = 0;

            dataInput.Output = (row) => {
                index++;
            };

            dataInput.Start();

            Assert.AreEqual(1694, index);
        }
Esempio n. 5
0
        public void InputTest001()
        {
            var model = new DataInputModel
            {
                SourceType = "mongo",
                ObjectName = "landing.office_365_threads",
                Connection = "mongodb://localhost:27017",
                Filter     = "{}"
            };

            var dataInput = new MongoDataInput(model);

            var index = 0;

            dataInput.Output = (row) => {
                index++;
            };

            dataInput.Start();

            Assert.AreEqual(1694, index);
        }
Esempio n. 6
0
 public FakeDataInput(DataInputModel model)
 {
 }
Esempio n. 7
0
        public FakeDataInput(DataInputModel model)
        {

        }