public virtual ApiEventResponseModel MapBOToModel(
            BOEvent boEvent)
        {
            var model = new ApiEventResponseModel();

            model.SetProperties(boEvent.Id, boEvent.Address1, boEvent.Address2, boEvent.CityId, boEvent.Date, boEvent.Description, boEvent.EndDate, boEvent.Facebook, boEvent.Name, boEvent.StartDate, boEvent.Website);

            return(model);
        }
        public virtual ApiEventResponseModel MapBOToModel(
            BOEvent boEvent)
        {
            var model = new ApiEventResponseModel();

            model.SetProperties(boEvent.Id, boEvent.ActualEndDate, boEvent.ActualStartDate, boEvent.BillAmount, boEvent.EventStatusId, boEvent.ScheduledEndDate, boEvent.ScheduledStartDate, boEvent.StudentNote, boEvent.TeacherNote);

            return(model);
        }
        public virtual ApiEventResponseModel MapBOToModel(
            BOEvent boEvent)
        {
            var model = new ApiEventResponseModel();

            model.SetProperties(boEvent.Id, boEvent.AutoId, boEvent.Category, boEvent.EnvironmentId, boEvent.JSON, boEvent.Message, boEvent.Occurred, boEvent.ProjectId, boEvent.RelatedDocumentIds, boEvent.TenantId, boEvent.UserId, boEvent.Username);

            return(model);
        }
Esempio n. 4
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiEventModelMapper();
            var model  = new ApiEventResponseModel();

            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");
            ApiEventRequestModel response = mapper.MapResponseToRequest(model);

            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.StudentNote.Should().Be("A");
            response.TeacherNote.Should().Be("A");
        }
Esempio n. 5
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiEventModelMapper();
            var model  = new ApiEventResponseModel();

            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");
            ApiEventRequestModel response = mapper.MapResponseToRequest(model);

            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");
        }
        public void MapResponseToRequest()
        {
            var mapper = new ApiEventModelMapper();
            var model  = new ApiEventResponseModel();

            model.SetProperties("A", 1, "A", "A", "A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", "A");
            ApiEventRequestModel response = mapper.MapResponseToRequest(model);

            response.AutoId.Should().Be(1);
            response.Category.Should().Be("A");
            response.EnvironmentId.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Message.Should().Be("A");
            response.Occurred.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.ProjectId.Should().Be("A");
            response.RelatedDocumentIds.Should().Be("A");
            response.TenantId.Should().Be("A");
            response.UserId.Should().Be("A");
            response.Username.Should().Be("A");
        }