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); }
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); }
public EchoModel PostBinderTHISISSHIT(EchoModel echoModel) { return(echoModel); }
public EchoModel PostBinderTHISISSHIT(EchoModel echoModel) { return echoModel; }