コード例 #1
0
        protected void ReadDiffsFromXmlString(string diffs)
        {
            ModelApplicationBase diffsLayer = ApplicationCreator.CreateModelApplication();

            ApplicationModelTestsHelper.AddLayer((ModelApplicationBase)modelApplication, diffsLayer);
            ReadModel(diffs, diffsLayer);
        }
コード例 #2
0
        protected IModelApplication CreateTestModel(IEnumerable <Type> boModelTypes, params string[] layerXmls)
        {
            ModelApplicationBase model = ApplicationCreator.CreateModelApplication();

            ApplicationModelTestsHelper.AddLayer(model, ApplicationCreator.CreateModelApplication());
            if (layerXmls != null)
            {
                ModelXmlReader reader = new ModelXmlReader();
                foreach (string layerXml in layerXmls)
                {
                    ModelApplicationBase layer = ApplicationCreator.CreateModelApplication();
                    if (!string.IsNullOrEmpty(layerXml))
                    {
                        reader.ReadFromString(layer, string.Empty, layerXml);
                    }
                    ApplicationModelTestsHelper.AddLayer(model, layer);
                }
            }
            ((IModelSources)model).BOModelTypes = boModelTypes != null ? boModelTypes : Type.EmptyTypes;
            return((IModelApplication)model);
        }