public async Task The_Function_Should_Throw_A_Bad_Request_When_We_Dont_Pass_In_A_Request_Body() { var req = HttpRequestCreator.CreateRequest(); var logger = NullLogger.Instance; var response = await SharePost.Run(req, logger); Assert.IsTrue(response is BadRequestObjectResult); }
public async Task The_Function_Should_Return_An_Ok_Object_Result_When_We_Pass_In_A_Valid_Request_Body() { var req = await HttpRequestCreator.CreateRequest("www.google.com", "This is test content."); var logger = NullLogger.Instance; var response = await SharePost.Run(req, logger); Assert.IsTrue(response is OkObjectResult); }
public async Task The_Function_Should_Throw_A_Bad_Request_When_We_Dont_Pass_In_Data_For_Properties( string postUrl, string postContent) { var req = await HttpRequestCreator.CreateRequest(postUrl, postContent); var logger = NullLogger.Instance; var response = await SharePost.Run(req, logger); Assert.IsTrue(response is BadRequestObjectResult); }