* Test method for 'com.google.checkout.sample.protocol.MerchantCalculationResultBuilder.createGiftCertResult(boolean, float, String, String)'
*/
public void testCreateGiftCertResult() throws Exception {
MerchantCalculationResultBuilder builder
= MerchantCalculationResultBuilder.getInstance();
GiftCertificateResult gift1 = builder.createGiftCertResult(true, 100F,
"GIFT100", "100$USD value");
assertEquals("GIFT100", gift1.getCode());
try {
GiftCertificateResult invalidGiftCert
= builder.createGiftCertResult(false, -100.00F, "X1093432222",
"negative gift value");
} catch (ProtocolException protoEx) {
assertContains(protoEx.getMessage(), "negative");
}