Esempio n. 1
0
        public void OverwrittenProperties()
        {
            var actualModel = new SimpleTestsModel();

            Configurator.Configurator.AssignConfiguration(
                @"
Overwrite=x
Overwrite=y
", actualModel);
            Assert.AreEqual("y", actualModel.Overwrite);

            actualModel = new SimpleTestsModel();
            Configurator.Configurator.AssignConfiguration(
                @"
Overwrite=x
<@Overwrite>z</@Overwrite>
", actualModel);
            Assert.AreEqual("z", actualModel.Overwrite);

            Configurator.Configurator.AssignConfiguration(
                @"
Overwrite=x
Overwrite=a
", actualModel);
            Assert.AreEqual("a", actualModel.Overwrite);
        }
Esempio n. 2
0
        public void MergeLists()
        {
            var actualModel = new SimpleTestsModel();

            Configurator.Configurator.AssignConfiguration(
                @"
<*MergeList>1 2 3</*MergeList>
<*MergeList> 4 5 6 </*MergeList>
", actualModel);
            CollectionAssert.AreEqual(new int[] { 1, 2, 3, 4, 5, 6 }, actualModel.MergeList.ToList());
        }