Exemple #1
0
        public void ConfigFromAssembly()
        {
            var assembly = typeof(Person).Assembly;

            DeltaConfig.InitFromAssembly(cfg => {
                cfg.AddAssembly(assembly);
            });
            CreateDelta <Person>("Age", 23).Patch(John);
            Assert.AreEqual(23, John.Age);
        }
Exemple #2
0
        public void ExcludedByMapping()
        {
            var assembly = typeof(Person).Assembly;

            DeltaConfig.InitFromAssembly(cfg =>
            {
                cfg
                .AddAssembly(assembly);
            });

            var initialAge = John.AgeExcludeByAttibute;

            CreateDelta <Person, int>(x => x.AgeExcludeByMapping, 23).Patch(John);

            Assert.AreEqual(initialAge, John.AgeExcludeByAttibute);
        }