public void Should_Throw_On_Null_Or_Empty_Data_Parameter() { //Given HttpSettings settings = new HttpSettings(); BodyModel data = null; //When var actual = Record.Exception(() => HttpSettingsExtensions.SetJsonRequestBody(settings, data)); //Then CakeAssert.IsArgumentNullException(actual, nameof(data)); }
public void Should_Throw_On_Null_Settings_Parameter() { //Given HttpSettings settings = null; BodyModel model = new BodyModel { Id = 1234567, Active = true, name = "Rob Test" }; //When var record = Record.Exception(() => HttpSettingsExtensions.SetJsonRequestBody(settings, model)); //Then CakeAssert.IsArgumentNullException(record, "settings"); }