Beispiel #1
0
 public void meeting_report_has_a_meetings_property()
 {
     if (_report == null)
     {
         _report = new MeetingReport(_dsReport, new SymphonySyncApi(null));
     }
     Assert.That(_report, Has.Property("Meetings"));
 }
Beispiel #2
0
        public void ShouldBeAbleToSaveAndRetrieveAMeetingDto()
        {
            var meetingTime = DateTime.Now.ToString("yyMMMdd");
            var clientDto   = new MeetingReport(Guid.NewGuid(), meetingTime);

            repository.Save(clientDto);
            var sut = repository.GetByExample <MeetingReport>(new { MeetingTime = meetingTime }).FirstOrDefault();

            Assert.That(sut.Id, Is.EqualTo(clientDto.Id));
            Assert.That(sut.MeetingTime, Is.EqualTo(clientDto.MeetingTime));
        }
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_dsReport != null)
                {
                    _dsReport.Dispose();
                    _report.Dispose();
                }
            }

            // Indicate that the instance has been disposed.
            _dsReport = null;
            _report   = null;
        }
Beispiel #4
0
        // Manage meeting reports
        public async Task <string> CreateMeetingReportAsync(string currentUserId, string builderId, CreateMeetingReportModel toCreate)
        {
            Coach coach = await GetCoachFromUserId(currentUserId);

            if (coach == null)
            {
                throw new Exception("You are not a coach");
            }

            Builder builder = await GetBuilderFromBuilderId(builderId);

            if (builder == null)
            {
                throw new Exception("The builder for the meeting report doesn't exist...");
            }
            if (builder.CoachId != coach.Id)
            {
                throw new UnauthorizedAccessException("You are not the coach of the builder");
            }

            MeetingReport meetingReport = new MeetingReport()
            {
                BuilderId = builderId,
                CoachId   = coach.Id,

                Date            = DateTime.Now,
                NextMeetingDate = toCreate.NextMeetingDate,

                Objectif  = toCreate.Objectif,
                Evolution = toCreate.Evolution,
                WhatsNext = toCreate.WhatsNext,
                Comments  = toCreate.Comments
            };

            await _meetingRepors.InsertOneAsync(meetingReport);

            return(meetingReport.Id);
        }
 public void WhenTheFileIsLoadedIntoTheSvmMeetingImporter()
 {
     _report = new MeetingReport(_dsReport, new SymphonySyncApi(_repository));
 }
Beispiel #6
0
 public void meeting_report_has_a_constructor_with_stream_input()
 {
     _report = new MeetingReport(_dsReport, new SymphonySyncApi(null));
     NUnit.Framework.Assert.IsInstanceOf(typeof(MeetingReport), _report);
 }