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); } } }
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()); }
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()); }
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); }
public FakeDataInput(DataInputModel model) { }