* 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");
String giftCert1 = builder.unmarshal(builder.convertToDOM(gift1));
assertEquals(giftResultOne, giftCert1);
try {
GiftCertificateResult invalidGiftCert
= builder.createGiftCertResult(false, -100.00F, "X1093432222",
"negative gift value");
} catch (ProtocolException protoEx) {
assertContains(protoEx.getMessage(), "negative");
}