Tests description handling
()
| 282 | * Tests description handling |
| 283 | */ |
| 284 | @Test |
| 285 | public void testDescription() |
| 286 | { |
| 287 | final Description desc1 = new Description("Description 1."); |
| 288 | final Race pobj = new Race(); |
| 289 | pobj.addToListFor(ListKey.DESCRIPTION, desc1); |
| 290 | |
| 291 | PlayerCharacter pc = getCharacter(); |
| 292 | assertEquals("Description should match", "Description 1.", pc |
| 293 | .getDescription(pobj)); |
| 294 | |
| 295 | final Description desc2 = new Description("Description 2."); |
| 296 | pobj.addToListFor(ListKey.DESCRIPTION, desc2); |
| 297 | |
| 298 | assertEquals("Description should match", "Description 1. Description 2.", |
| 299 | pc.getDescription(pobj)); |
| 300 | |
| 301 | final Description desc3 = new Description("Description %1."); |
| 302 | desc3.addVariable("\"3\""); |
| 303 | pobj.addToListFor(ListKey.DESCRIPTION, desc3); |
| 304 | |
| 305 | assertEquals("Description should match", |
| 306 | "Description 1. Description 2. Description 3.", pc |
| 307 | .getDescription(pobj)); |
| 308 | |
| 309 | pobj.removeFromListFor(ListKey.DESCRIPTION, desc2); |
| 310 | assertEquals("Description should match", "Description 1. Description 3.", |
| 311 | pc.getDescription(pobj)); |
| 312 | } |
| 313 | |
| 314 | /** |
| 315 | * Test the definition and application of abilities. |
nothing calls this directly
no test coverage detected