コード例 #1
0
        public void TestInitialize()
        {
            _serviceLocatorMock        = new Mock <IServiceLocator>();
            _customPatternProviderMock = new Mock <DefaultPatternProvider>();

            _defaultSourceProvider  = new DefaultSourceProvider();
            _columnGeneratorFactory = new ColumnGeneratorFactory(_serviceLocatorMock.Object);
            _dataGeneratorDataSet   = new DataGeneratorDataSet(_columnGeneratorFactory);
        }
コード例 #2
0
        public override void Execute(IDictionary <string, object> input)
        {
            var definitionFile = input.Get <string>(DEFINITION);
            var target         = input.Get <string>(TARGET);

            var json = File.ReadAllText(definitionFile);
            var dataGenerationInfo = _dataGenerationParser.Load(json);
            var generator          = new DataGeneratorDataSet(_columnGeneratorFactory);
            var ds = generator.Generate(dataGenerationInfo);

            ds.WriteXml(target);
        }