public void TypiconImportProjectorTest_Import()
        {
            var manager = new TypiconImportProjector(
                new CollectorSerializerRoot(
                    QueryProcessorFactory.Create()
                    , new TypiconSerializer()));

            var xml = TestDataXmlReader.GetXmlString("TypiconVersion.xml");

            var projection = new TypiconSerializer().Deserialize <TypiconVersionProjection>(xml);

            var entity = manager.Project(projection);

            var vars = entity.Value.Versions.First().TypiconVariables;

            Assert.AreEqual(3, vars.Count);
            Assert.Pass(string.Join('\n', vars.Select(c => c.Name)));
        }
        public void TypiconImportProjectorTest_Import_To_Db()
        {
            var manager = new TypiconImportProjector(
                new CollectorSerializerRoot(
                    QueryProcessorFactory.Create()
                    , new TypiconSerializer()));

            var xml = TestDataXmlReader.GetXmlString("TypiconVersion.xml");

            var projection = new TypiconSerializer().Deserialize <TypiconVersionProjection>(xml);

            var entity = manager.Project(projection);

            var dbContext = TypiconDbContextFactory.Create();

            dbContext.Set <TypiconEntity>().Add(entity.Value);
            int i = dbContext.SaveChanges();

            Assert.Greater(i, 0);
            Assert.Pass(i.ToString());
        }