Example #1
0
        public void GivenAModelSetupByNoRMaticInitializer_Save_ShouldRespectBehaviors()
        {
            Subscriber.DropBehaviors();

            NoRMaticConfig.Initialize();

            var subscriber = new Subscriber { FirstName = "Joe", LastName = "Peters" };
            subscriber.Save();

            subscriber.LastName = "Jones";
            subscriber.Save();

            var versions = subscriber.GetVersions();

            Assert.AreEqual(2, versions.Count());
        }