// Path: client/src/main/java/com/shopzilla/api/client/helper/CredentialFactory.java
// public class CredentialFactory {
//     private String publisherId;
//     private String publisherApiKey;
// 
//     public CredentialFactory() {
//         String id = StringUtils.isNotBlank(System.getenv("PUBLISHER_ID")) ? System.getenv("PUBLISHER_ID") : System.getProperty("PUBLISHER_ID");
//         String key = StringUtils.isNotBlank(System.getenv("PUBLISHER_API_KEY")) ? System.getenv("PUBLISHER_API_KEY") : System.getProperty("PUBLISHER_API_KEY");
// 
//         if (key != null && id != null) {
//             this.publisherId = id;
//             this.publisherApiKey = key;
//         } else {
//             throw new IllegalArgumentException("No API credentials were provided! "+
//                                                "Please set PUBLISHER_ID and PUBLISHER_API_KEY ");
//         }
//     }
// 
//     public String getPublisherId() {
//         return publisherId;
//     }
// 
//     public String getPublisherApiKey() {
//         return publisherApiKey;
//     }
// }


import com.shopzilla.api.client.helper.CredentialFactory;
import com.shopzilla.services.catalog.ProductResponse;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static junit.framework.Assert.assertEquals;
/**
 * Copyright 2011 Shopzilla.com
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.shopzilla.api.client;



/**
 * @author alook
 * @since 3/27/11
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring/applicationContext-client-test.xml"})
public class ProductClientIntegrationTest {
    @Autowired
    ProductClient client;

    @Autowired
// Path: client/src/main/java/com/shopzilla/api/client/helper/CredentialFactory.java
// public class CredentialFactory {
//     private String publisherId;
//     private String publisherApiKey;
// 
//     public CredentialFactory() {
//         String id = StringUtils.isNotBlank(System.getenv("PUBLISHER_ID")) ? System.getenv("PUBLISHER_ID") : System.getProperty("PUBLISHER_ID");
//         String key = StringUtils.isNotBlank(System.getenv("PUBLISHER_API_KEY")) ? System.getenv("PUBLISHER_API_KEY") : System.getProperty("PUBLISHER_API_KEY");
// 
//         if (key != null && id != null) {
//             this.publisherId = id;
//             this.publisherApiKey = key;
//         } else {
//             throw new IllegalArgumentException("No API credentials were provided! "+
//                                                "Please set PUBLISHER_ID and PUBLISHER_API_KEY ");
//         }
//     }
// 
//     public String getPublisherId() {
//         return publisherId;
//     }
// 
//     public String getPublisherApiKey() {
//         return publisherApiKey;
//     }
// }


// Path: client/src/test/java/com/shopzilla/api/client/ProductClientIntegrationTest.java
import com.shopzilla.api.client.helper.CredentialFactory;
import com.shopzilla.services.catalog.ProductResponse;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static junit.framework.Assert.assertEquals;

/**
 * Copyright 2011 Shopzilla.com
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.shopzilla.api.client;



/**
 * @author alook
 * @since 3/27/11
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring/applicationContext-client-test.xml"})
public class ProductClientIntegrationTest {
    @Autowired
    ProductClient client;

    @Autowired
    CredentialFactory credentialFactory;