Exemple #1
0
            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));
            }
Exemple #2
0
            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");
            }