Ejemplo n.º 1
0
        public async Task <IActionResult> Post([FromBody] MeetingRoomSchedulingDTO meetiingRommScheduling)
        {
            var meetingRommScheduling    = _mapper.Map <MeetingRoomSchedulingModel>(meetiingRommScheduling);
            var newMeetingRommScheduling = await _meetingRoomSchedulingBusiness.PostMeetingRommScheduling(meetingRommScheduling);

            return(CreatedAtAction(nameof(GetMeetingRoomSchedulingById), new { id = meetingRommScheduling.Id }, _mapper.Map <MeetingRoomSchedulingDTO>(newMeetingRommScheduling)));
        }
Ejemplo n.º 2
0
        public async Task PostMeetingRoomSchedulingWithoutNumberAndBadRequest()
        {
            var meetingRoomScheduling = new MeetingRoomSchedulingDTO
            {
                Date = DateTime.UtcNow,
                Hour = RangeOfHoursEnum.NinetOclockAM
            };

            var json = new StringContent(JsonConvert.SerializeObject(meetingRoomScheduling), Encoding.UTF8, "application/json");

            var response = await _httpClient.PostAsync($"/meetingroomscheduling", json);

            Assert.IsNotNull(response.Content);
        }