public void GivenNeededSkill_WhenDeriving_ThenRequiredRelationsMustExist() { var projectManagement = new Skills(this.Session).ProjectManagement; var expert = new SkillLevels(this.Session).Expert; var builder = new NeededSkillBuilder(this.Session); var neededSkill = builder.Build(); Assert.True(this.Session.Derive(false).HasErrors); this.Session.Rollback(); builder.WithSkill(projectManagement); neededSkill = builder.Build(); Assert.True(this.Session.Derive(false).HasErrors); this.Session.Rollback(); builder.WithSkillLevel(expert); neededSkill = builder.Build(); Assert.False(this.Session.Derive(false).HasErrors); }
public void GivenNeededSkill_WhenDeriving_ThenRequiredRelationsMustExist() { var projectManagement = new Skills(this.DatabaseSession).ProjectManagement; var expert = new SkillLevels(this.DatabaseSession).Expert; var builder = new NeededSkillBuilder(this.DatabaseSession); var neededSkill = builder.Build(); Assert.IsTrue(this.DatabaseSession.Derive().HasErrors); this.DatabaseSession.Rollback(); builder.WithSkill(projectManagement); neededSkill = builder.Build(); Assert.IsTrue(this.DatabaseSession.Derive().HasErrors); this.DatabaseSession.Rollback(); builder.WithSkillLevel(expert); neededSkill = builder.Build(); Assert.IsFalse(this.DatabaseSession.Derive().HasErrors); }