Beispiel #1
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));
        }
Beispiel #2
0
        public void Will_be_able_to_save_and_retrieve_a_category_dto()
        {
            var categoryReport = new CategoryReport(Guid.NewGuid(), Guid.Empty, "Test Category");

            _repository.Save(categoryReport);
            CategoryReport sut = _repository.GetByExample <CategoryReport>(new { Name = "Test Category" }).FirstOrDefault();

            Assert.That(sut.Id, Is.EqualTo(categoryReport.Id));
            Assert.That(sut.Name, Is.EqualTo(categoryReport.Name));
        }
Beispiel #3
0
        public void Will_be_able_to_save_and_retrieve_a_client_dto()
        {
            var clientDto = new ClientReport(Guid.NewGuid(), "Mark Nijhof");

            _repository.Save(clientDto);
            var sut = _repository.GetByExample <ClientReport>(new { Name = "Mark Nijhof" }).FirstOrDefault();

            Assert.That(sut.Id, Is.EqualTo(clientDto.Id));
            Assert.That(sut.Name, Is.EqualTo(clientDto.Name));
        }