Hi,
last week i had to implement a algorithm that was a perfect candidate to first make a unit test
and based on that make the real code
Now i was wondering if i could also check that unit test in somewhere?
i created quickly a src-test dir in the plugins project but how is this done in eclipse ?
is there some kind of standard?
the unit test i had:
public void testIdResolving() throws Exception {
assertEquals("forms.xxx.yyy", HostCollection.parseId("forms.xxx.yyy"));
assertEquals("forms.xxx.yyy", HostCollection.parseId("forms.xxx.yyy()"));
assertEquals("forms.xxx.yyy", HostCollection
.parseId("forms.xxx().yyy()"));
assertEquals("forms.xxx.[].yyy.[]", HostCollection
.parseId("forms.xxx[].yyy[]"));
assertEquals("forms.[].yyy", HostCollection.parseId("forms[xxx].yyy"));
assertEquals("forms.[].yyy", HostCollection.parseId("forms[xxx()].yyy"));
assertEquals("forms.[].yyy", HostCollection
.parseId("forms[xxx(1)].yyy"));
assertEquals("xxx", HostCollection.parseId("forms[xxx"));
assertEquals("", HostCollection.parseId("forms[xxx("));
assertEquals("a", HostCollection.parseId("forms[xxx(a"));
assertEquals("xxx", HostCollection.parseId("forms[xxx(1)"));
assertEquals("xxx.yyy", HostCollection.parseId("forms[xxx(1).yyy"));
assertEquals("forms.[]", HostCollection.parseId("forms[xxx(1).yyy]"));
assertEquals("forms.[]", HostCollection.parseId("forms[xxx(1).yyy]]"));
assertEquals("forms.[]", HostCollection.parseId("forms[xxx(1)).yyy]"));
assertEquals("forms.[]", HostCollection.parseId(")forms[xxx(1)).yyy]"));
}
------------------------------------------------------------------------