Esempio n. 1
0
        public void VariableSynchronizer_Test()
        {
            string xml = TestDataXmlReader.GetXmlString("VariablesTest.xml");

            var dbContext = TypiconDbContextFactory.Create();

            var entity = dbContext.Set <Sign>().FirstOrDefault(c => c.TypiconVersionId == 1);

            entity.RuleDefinition = xml;

            entity.SyncRuleVariables(TestRuleSerializer.CreateCollectorSerializerRoot());

            Assert.IsTrue(entity.TypiconVersion.TypiconVariables.Count == 2);
        }