public void MapServerResponseToRequest() { var mapper = new ApiEventServerModelMapper(); var model = new ApiEventServerResponseModel(); model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1m, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A"); ApiEventServerRequestModel response = mapper.MapServerResponseToRequest(model); response.Should().NotBeNull(); response.ActualEndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ActualStartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.BillAmount.Should().Be(1m); response.EventStatusId.Should().Be(1); response.ScheduledEndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ScheduledStartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.StudentNotes.Should().Be("A"); response.TeacherNotes.Should().Be("A"); }
public void MapServerResponseToRequest() { var mapper = new ApiEventServerModelMapper(); var model = new ApiEventServerResponseModel(); model.SetProperties(1, "A", "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); ApiEventServerRequestModel response = mapper.MapServerResponseToRequest(model); response.Should().NotBeNull(); response.Address1.Should().Be("A"); response.Address2.Should().Be("A"); response.CityId.Should().Be(1); response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Description.Should().Be("A"); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Facebook.Should().Be("A"); response.Name.Should().Be("A"); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Website.Should().Be("A"); }