public static void PutExcessivelyLongDescriptionShouldReject( [Frozen] SpDefineApi api, RandomProductFromListFixture product ) { product.SelectedProduct.Description = new String( 'a', 101 ); Assert.Equal( HttpStatusCode.BadRequest, product.PutSelectedProduct().StatusCode ); }
public static void PutEmptyShouldReject( [Frozen] SpDefineApi api, RandomProductFromListFixture product ) { product.SelectedProduct.Label = string.Empty; Assert.Equal( HttpStatusCode.BadRequest, product.PutSelectedProduct().StatusCode ); }
public static void PutNullDescriptionShouldReject( [Frozen] SpDefineApi api, RandomProductFromListFixture product ) { product.SelectedProduct.Description = null; Assert.Equal( HttpStatusCode.BadRequest, product.PutSelectedProduct().StatusCode ); }
public static void PutProductFromListWithUpdatedLabelShouldRoundtrip( [Frozen] SpDefineApi api, RandomProductFromListFixture product, string updatedValue ) { product.SelectedProduct.Label = updatedValue; Assert.Equal( HttpStatusCode.OK, product.PutSelectedProduct().StatusCode ); Verify.EventuallyWithBackOff( () => Assert.Equal( updatedValue, product.GetSelectedProductAgain().Label ) ); }