Пример #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;
        }