Exemplo n.º 1
0
					public static void PutExcessivelyLongDescriptionShouldReject( [Frozen] SpDefineApi api, RandomProductFromListFixture product )
					{
						product.SelectedProduct.Description = new String( 'a', 101 );
						Assert.Equal( HttpStatusCode.BadRequest, product.PutSelectedProduct().StatusCode );
					}
Exemplo n.º 2
0
					public static void PutEmptyShouldReject( [Frozen] SpDefineApi api, RandomProductFromListFixture product )
					{
						product.SelectedProduct.Label = string.Empty;
						Assert.Equal( HttpStatusCode.BadRequest, product.PutSelectedProduct().StatusCode );
					}
Exemplo n.º 3
0
					public static void PutNullDescriptionShouldReject( [Frozen] SpDefineApi api, RandomProductFromListFixture product )
					{
						product.SelectedProduct.Description = null;
						Assert.Equal( HttpStatusCode.BadRequest, product.PutSelectedProduct().StatusCode );
					}
Exemplo n.º 4
0
			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 ) );
			}