public SummaryModel GetSummary(int projectId)
 {
     SummaryModel model = new SummaryModel();
     Project project = session.Load<Project>(projectId);
     model.FilledBy(project);
     return model;
 }
        public void Summary_FilledBy_Project()
        {
            #region project

            SummaryModel model = new SummaryModel();
            model.FilledBy(project);

            summary_fill_by(model.Abstract, project);

            Assert.That(model.Projects, Is.Not.Null);
            Assert.That(model.Projects.Count, Is.EqualTo(2));
            Assert.That(model.Projects[0].Children.Count, Is.EqualTo(3));
            Assert.That(model.Projects[1].Children.Count, Is.EqualTo(2));

            Assert.That(contains(model.Projects, project_1));
            Assert.That(contains(model.Projects, project_5));

            #endregion

            #region project_1

            SummaryModel model_1 = new SummaryModel();
            model_1.FilledBy(project_1);

            summary_fill_by(model_1.Abstract, project_1);

            Assert.That(model_1.Projects, Is.Not.Null);
            Assert.That(model_1.Projects.Count, Is.EqualTo(3));
            Assert.That(contains(model_1.Projects, project_2));
            Assert.That(contains(model_1.Projects, project_3));
            Assert.That(contains(model_1.Projects, project_4));

            #endregion

            #region project_2

            SummaryModel model_2 = new SummaryModel();
            model_2.FilledBy(project_2);

            summary_fill_by(model_2.Abstract, project_2);

            Assert.That(model_2.Authorizations.Count, Is.EqualTo(4));
            Assert.That(contains(model_2.Authorizations, authorization_1));
            Assert.That(contains(model_2.Authorizations, authorization_2));
            Assert.That(contains(model_2.Authorizations, authorization_3));
            Assert.That(contains(model_2.Authorizations, authorization_4));  
          
            #endregion
        }