Ejemplo n.º 1
0
        public void GivenCostCenterCategory_WhenDeriving_ThenPostBuildRelationsMustExist()
        {
            var costCenterCategory = new CostCenterCategoryBuilder(this.Session)
                                     .WithDescription("CostCenterCategory")
                                     .Build();

            Assert.True(costCenterCategory.ExistUniqueId);
        }
Ejemplo n.º 2
0
        public void GivenCostCenterCategory_WhenDeriving_ThenPostBuildRelationsMustExist()
        {
            var costCenterCategory = new CostCenterCategoryBuilder(this.DatabaseSession)
                .WithDescription("CostCenterCategory")
                .Build();

            Assert.IsTrue(costCenterCategory.ExistUniqueId);
        }
Ejemplo n.º 3
0
        public void GivenCostCenterCategory_WhenDeriving_ThenRequiredRelationsMustExist()
        {
            var builder = new CostCenterCategoryBuilder(this.DatabaseSession);
            builder.Build();

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

            this.DatabaseSession.Rollback();

            builder.WithDescription("CostCenterCategory");
            builder.Build();

            Assert.IsFalse(this.DatabaseSession.Derive().HasErrors);
        }
Ejemplo n.º 4
0
        public void GivenCostCenterCategory_WhenDeriving_ThenRequiredRelationsMustExist()
        {
            var builder = new CostCenterCategoryBuilder(this.Session);

            builder.Build();

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

            this.Session.Rollback();

            builder.WithDescription("CostCenterCategory");
            builder.Build();

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