public void Should_Map() { // Arrange var dto = new MusicianProfileModifyDto { Id = Guid.NewGuid(), Body = new MusicianProfileModifyBodyDto { IsMainProfile = true, IsDeactivated = false, LevelAssessmentInner = 1, LevelAssessmentTeam = 2, ProfilePreferenceInner = 3, ProfilePreferenceTeam = 4, BackgroundInner = "Performer gave some background", BackgroundTeam = "Staff gave some background", SalaryComment = "Perfomer only accepty PayPal", QualificationId = Guid.NewGuid(), SalaryId = Guid.NewGuid(), InquiryStatusInnerId = Guid.NewGuid(), InquiryStatusTeamId = Guid.NewGuid(), // ToDo for collections } }; var expectedCommand = new Modify.Command { Id = dto.Id, IsMainProfile = dto.Body.IsMainProfile, IsDeactivated = dto.Body.IsDeactivated, LevelAssessmentInner = dto.Body.LevelAssessmentInner, LevelAssessmentTeam = dto.Body.LevelAssessmentTeam, ProfilePreferenceInner = dto.Body.ProfilePreferenceInner, ProfilePreferenceTeam = dto.Body.ProfilePreferenceTeam, BackgroundInner = dto.Body.BackgroundInner, BackgroundTeam = dto.Body.BackgroundTeam, SalaryComment = dto.Body.SalaryComment, QualificationId = dto.Body.QualificationId, SalaryId = dto.Body.SalaryId, InquiryStatusInnerId = dto.Body.InquiryStatusInnerId, InquiryStatusTeamId = dto.Body.InquiryStatusTeamId, // ToDo for collections }; // Act Modify.Command command = _mapper.Map <Modify.Command>(dto); // Assert command.Should().BeEquivalentTo(expectedCommand); }
public void Should_Map() { // Arrange var dto = new MyUserProfileModifyDto { Email = UserTestSeedData.Performer.Email, GivenName = "Orsi", Surname = "Aner", PhoneNumber = "123456" }; // Act Modify.Command command = _mapper.Map <Modify.Command>(dto); // Assert command.Should().BeEquivalentTo(dto); }
public void Should_Map() { // Arrange var regionDto = new RegionModifyDto { Id = Guid.NewGuid(), Body = new RegionModifyBodyDto { Name = "Name" } }; var expectedCommand = new Modify.Command { Id = regionDto.Id, Name = regionDto.Body.Name }; // Act Modify.Command command = _mapper.Map <Modify.Command>(regionDto); // Assert command.Should().BeEquivalentTo(expectedCommand); }
public void Should_Map() { // Arrange var dto = new ProjectModifyDto { Id = Guid.NewGuid(), Body = new ProjectModifyBodyDto { Title = "Title", ShortTitle = "Short Title", Description = "Description", Code = "0815ABC", TypeId = Guid.NewGuid(), GenreId = Guid.NewGuid(), StartDate = new DateTime(2022, 03, 03), EndDate = new DateTime(2022, 04, 04), StateId = Guid.NewGuid(), ParentId = Guid.NewGuid(), IsCompleted = true } }; var expectedCommand = new Modify.Command { Id = dto.Id, Title = dto.Body.Title, ShortTitle = dto.Body.ShortTitle, Description = dto.Body.Description, Code = dto.Body.Code, TypeId = dto.Body.TypeId, GenreId = dto.Body.GenreId, StartDate = dto.Body.StartDate, EndDate = dto.Body.EndDate, StateId = dto.Body.StateId, ParentId = dto.Body.ParentId, IsCompleted = dto.Body.IsCompleted }; // Act Modify.Command command = _mapper.Map <Modify.Command>(dto); // Assert command.Should().BeEquivalentTo(expectedCommand); }
public void Should_Map() { // Arrange var dto = new AppointmentModifyDto { Id = Guid.NewGuid(), Body = new AppointmentModifyBodyDto { InternalDetails = "Internal Details", PublicDetails = "Public Details", Name = "Name", StartTime = DateTime.Now, EndTime = DateTime.Now.AddHours(2), CategoryId = Guid.NewGuid(), SalaryId = Guid.NewGuid(), SalaryPatternId = Guid.NewGuid(), StatusId = Guid.NewGuid() } }; var expectedCommand = new Modify.Command { Id = dto.Id, InternalDetails = dto.Body.InternalDetails, PublicDetails = dto.Body.PublicDetails, Name = dto.Body.Name, StartTime = dto.Body.StartTime, EndTime = dto.Body.EndTime, CategoryId = dto.Body.CategoryId, SalaryId = dto.Body.SalaryId, SalaryPatternId = dto.Body.SalaryPatternId, StatusId = dto.Body.StatusId }; // Act Modify.Command command = _mapper.Map <Modify.Command>(dto); // Assert command.Should().BeEquivalentTo(expectedCommand); }