예제 #1
0
        public void Should_be_able_to_send_json_in_body()
        {
            // Given
            var model = new EchoModel {
                SomeString = "Some String", SomeInt = 29, SomeBoolean = true
            };

            // When
            var result = browser.Post("/GetData/WEE", with =>
            {
                with.JsonBody(model);
            });


            // Then
            var actualModel = result.Content.DeserializeJson <EchoModel>();

            Assert.NotNull(actualModel);
            Assert.Equal(model.SomeString, actualModel.SomeString);
            Assert.Equal(model.SomeInt, actualModel.SomeInt);
            Assert.Equal(model.SomeBoolean, actualModel.SomeBoolean);
        }
예제 #2
0
        public void Should_be_able_to_send_json_in_body()
        {
            // Given
            var model = new EchoModel { SomeString = "Some String", SomeInt = 29, SomeBoolean = true };

            // When
            var result = browser.Post("/GetData/WEE", with =>
                                            {
                                                with.JsonBody(model);
                                            });


            // Then
            var actualModel = result.Content.DeserializeJson<EchoModel>();

            Assert.NotNull(actualModel);
            Assert.Equal(model.SomeString, actualModel.SomeString);
            Assert.Equal(model.SomeInt, actualModel.SomeInt);
            Assert.Equal(model.SomeBoolean, actualModel.SomeBoolean);
        }
예제 #3
0
 public EchoModel PostBinderTHISISSHIT(EchoModel echoModel)
 {
     return(echoModel);
 }
예제 #4
0
        public EchoModel PostBinderTHISISSHIT(EchoModel echoModel)
        {

            return echoModel;
        }