Пример #1
0
 public LoginCredentialsDTO MapFrom(IHttpRequest input)
 {
     return(new LoginCredentialsDTO(
                input.ParsePayloadFor(PayloadKeys.For("uxUserNameTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxPasswordTextBox"))
                ));
 }
Пример #2
0
 public SubmitLeaseRequestDTO MapFrom(IHttpRequest input)
 {
     return(new SubmitLeaseRequestDTO(
                input.ParsePayloadFor(PayloadKeys.CustomerId),
                input.ParsePayloadFor(PayloadKeys.SlipId),
                input.ParsePayloadFor(PayloadKeys.For("uxLeaseDuration"))
                ));
 }
Пример #3
0
 public BoatRegistrationDTO MapFrom(IHttpRequest input)
 {
     return(new BoatRegistrationDTO(
                input.ParsePayloadFor(PayloadKeys.For("uxRegistrationNumberTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxManufacturerTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxModelYearTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxLengthTextBox")),
                input.ParsePayloadFor(PayloadKeys.CustomerId)
                ));
 }
Пример #4
0
        public void Should_map_username_from_request( )
        {
            using (mockery.Record( )) {
                Expect.Call(mockRequest.ParsePayloadFor(PayloadKeys.For("uxUserNameTextBox"))).Return(null);
                Expect.Call(mockRequest.ParsePayloadFor(PayloadKeys.For("uxPasswordTextBox"))).Return(null);
            }

            using (mockery.Playback( )) {
                CreateSUT( ).MapFrom(mockRequest);
            }
        }
Пример #5
0
 public UpdateCustomerRegistrationDTO MapFrom(IHttpRequest input)
 {
     return(new UpdateCustomerRegistrationDTO(
                input.ParsePayloadFor(PayloadKeys.CustomerId),
                input.ParsePayloadFor(PayloadKeys.For("uxUserNameTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxPasswordTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxFirstNameTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxLastNameTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxPhoneNumberTextBox")),
                input.ParsePayloadFor(PayloadKeys.For("uxCityTextBox"))
                ));
 }
 public PayloadKey <string> Create(string controlId)
 {
     return(PayloadKeys.For(controlId));
 }