package de.gurkenlabs.litiengine.environment.tilemap.xml;

import org.junit.Test;

import junit.framework.Assert;

public class CustomPropertyProviderTests {

  @Test
  public void testSetCustomProperty() {
    CustomPropertyProvider propProvider = new CustomPropertyProvider();
    propProvider.setCustomProperty("test", "testvalue");

    Assert.assertEquals("testvalue", propProvider.getCustomProperty("test"));
    Assert.assertNull(propProvider.getCustomProperty("test2"));
    Assert.assertEquals(1, propProvider.getAllCustomProperties().size());

    propProvider.setCustomProperty("test", "testvalue2");

    Assert.assertEquals("testvalue2", propProvider.getCustomProperty("test"));
  }
}

@@ -52,16 +52,45 @@
 p.xml;%0A%0A
+import java.util.ArrayList;%0A%0A
 import o
@@ -713,15 +713,452 @@
 test%22));
+%0A%0A    ArrayList%3CProperty%3E props = new ArrayList%3C%3E();%0A    props.add(new Property(%22test2%22, %22testvalue3%22));%0A    props.add(new Property(%22test3%22, %22testvalue4%22));%0A%0A    propProvider.setCustomProperties(props);%0A%0A    Assert.assertEquals(2, propProvider.getAllCustomProperties().size());%0A    Assert.assertEquals(%22testvalue3%22, propProvider.getCustomProperty(%22test2%22));%0A    Assert.assertEquals(%22testvalue4%22, propProvider.getCustomProperty(%22test3%22));
 %0A  %7D%0A%7D%0A

Add additional test case for setting custom properties by a collection.