public void Parse_NotAFoo() { const string foo = "hi, I'm not a foo"; var request = new APIGatewayProxyRequest { Body = foo }; request.Parse <Foo>().Should().BeEquivalentTo(new Foo()); }
public void Parse() { var foo = new Foo { FirstName = "first", LastName = "last" }; var request = new APIGatewayProxyRequest { Body = foo.ToJson() }; request.Parse <Foo>().Should().BeEquivalentTo(foo); }