Beispiel #1
0
        public void GivenAgreementSection_WhenDeriving_ThenDescriptionIsRequired()
        {
            var builder = new AgreementSectionBuilder(this.DatabaseSession);
            var agreementSection = builder.Build();

            Assert.IsTrue(this.DatabaseSession.Derive().HasErrors);

            this.DatabaseSession.Rollback();

            builder.WithDescription("AgreementSection");
            agreementSection = builder.Build();

            Assert.IsFalse(this.DatabaseSession.Derive().HasErrors);
        }
Beispiel #2
0
        public void GivenAgreementSection_WhenDeriving_ThenDescriptionIsRequired()
        {
            var builder          = new AgreementSectionBuilder(this.Session);
            var agreementSection = builder.Build();

            Assert.True(this.Session.Derive(false).HasErrors);

            this.Session.Rollback();

            builder.WithDescription("AgreementSection");
            agreementSection = builder.Build();

            Assert.False(this.Session.Derive(false).HasErrors);
        }