Beispiel #1
0
        public void Ctor_GivenSession_DoesNotThrow()
        {
            Action act = () =>
            {
                var session = CreateSession();

                BaseObject sut = new TestPersistentObject(session);
            };

            act.ShouldNotThrow();
        }
Beispiel #2
0
        public void ChangeNotification_IsWorking()
        {
            Session session = CreateSession();

            TestPersistentObject sut = new TestPersistentObject(session);

            const string expected = "ABC";

            int counter = 0;

            sut.Changed += (s, e) =>
            {
                e.NewValue.Should().Be(expected);
                counter++;
            };

            sut.TestProperty = expected;

            if (counter <= 0)
            {
                Assert.Fail("Changed Notfication didn't fire");
            }
        }