@@ -0,0 +1,1423 @@
+package org.trello4j;%0A%0Aimport java.io.IOException;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.util.Properties;%0A%0Aimport org.junit.Test;%0Aimport org.trello4j.model.Card;%0A%0Aimport static org.hamcrest.CoreMatchers.equalTo;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.fail;%0A%0A/**%0A * @author Johan Mynhardt%0A */%0Apublic class CardServiceTest %7B%0A%09@Test%0A%09public void testAddNewCardUsingPost() %7B%0A%09%09Properties properties = new Properties();%0A%09%09try %7B%0A%09%09%09properties.load(CardServiceTest.class.getResourceAsStream(%22/cardservice.properties%22));%0A%09%09%7D catch (NullPointerException e) %7B%0A%09%09%09fail(%22Could not load properties to test CardService: %22 + e.getMessage());%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09fail(e.getMessage());%0A%09%09%7D%0A%0A%09%09String developerKey = properties.getProperty(%22developerKey%22);%0A%09%09String token = properties.getProperty(%22token%22);%0A%09%09String listId = properties.getProperty(%22listId%22);%0A%0A%09%09String name = %22Trello4J CardService: Add Card using POST%22;%0A%09%09String description = %22Something awesome happened :)%22;%0A%0A%09%09Map%3CString, String%3E keyValueMap = new HashMap%3CString, String%3E();%0A%09%09keyValueMap.put(%22desc%22, description);%0A%0A%09%09Trello trello = new TrelloImpl(developerKey, token);%0A%09%09Card card = trello.addNewCard(listId, name, keyValueMap);%0A%0A%09%09assertNotNull(card);%0A%0A%09%09assertThat(card.getName(), equalTo(name));%0A%09%09assertThat(card.getDesc(), equalTo(description));%0A%09%7D%0A%7D%0A

Test for adding a card using POST.