Changeset 1282 for trunk/autoquest-core-usageprofiles-test
- Timestamp:
- 07/30/13 09:38:43 (11 years ago)
- Location:
- trunk/autoquest-core-usageprofiles-test/src/test/java/de/ugoe/cs/autoquest/usageprofiles
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usageprofiles-test/src/test/java/de/ugoe/cs/autoquest/usageprofiles/DefaultSymbolMapTest.java
r1251 r1282 17 17 import static org.junit.Assert.*; 18 18 19 import java.util.HashSet; 19 20 import java.util.Iterator; 21 import java.util.Set; 20 22 21 23 import org.junit.Test; … … 29 31 * @author Patrick Harms 30 32 */ 31 public class SymbolMapTest {33 public class DefaultSymbolMapTest { 32 34 33 35 @Test 34 36 public void testSymbolMap_1() { 35 SymbolMap<String, String> symbolMap = 36 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 37 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 37 38 38 39 assertNotNull(symbolMap); … … 42 43 @Test 43 44 public void testSymbolMap_2() { 44 SymbolMap<String, String> symbolMap1 = 45 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 45 SymbolMap<String, String> symbolMap1 = new DefaultSymbolMap<String, String>(); 46 46 47 47 symbolMap1.addSymbol("symbol", "value"); 48 48 49 SymbolMap<String, String> symbolMap2 = new SymbolMap<String, String>(symbolMap1);49 SymbolMap<String, String> symbolMap2 = new DefaultSymbolMap<String, String>(symbolMap1); 50 50 51 51 assertNotNull(symbolMap2); … … 55 55 @Test(expected = java.lang.IllegalArgumentException.class) 56 56 public void testSymbolMap_3() throws Exception { 57 new SymbolMap<String, String>((DefaultSymbolComparator<String>) null); 58 } 59 60 @Test(expected = java.lang.IllegalArgumentException.class) 61 public void testSymbolMap_4() throws Exception { 62 new SymbolMap<String, String>((SymbolMap<String, String>) null); 57 new DefaultSymbolMap<String, String>((SymbolMap<String, String>) null); 63 58 } 64 59 65 60 @Test 66 61 public void testAddSymbol_1() { 67 SymbolMap<String, String> symbolMap = 68 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 62 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 69 63 70 64 symbolMap.addSymbol("symbol1", "value1"); … … 76 70 @Test 77 71 public void testAddSymbol_2() { 78 SymbolMap<String, String> symbolMap = 79 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 72 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 80 73 81 74 int entryCount = 2000; … … 96 89 @Test 97 90 public void testAddSymbol_3() { 98 SymbolMap<String, String> symbolMap = 99 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 91 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 100 92 101 93 int entryCount = 2000; … … 123 115 @Test(expected = java.lang.IllegalArgumentException.class) 124 116 public void testAddSymbol_4() { 125 SymbolMap<String, String> symbolMap = 126 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 117 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 127 118 128 119 symbolMap.addSymbol(null, null); … … 131 122 @Test 132 123 public void testSize_1() { 133 SymbolMap<String, String> symbolMap = 134 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 124 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 135 125 136 126 assertEquals(0, symbolMap.size()); … … 139 129 @Test 140 130 public void testSize_2() { 141 SymbolMap<String, String> symbolMap = 142 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 131 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 143 132 144 133 symbolMap.addSymbol("symbol1", "value1"); … … 149 138 @Test 150 139 public void testSize_3() { 151 SymbolMap<String, String> symbolMap = 152 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 140 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 153 141 154 142 int entryCount = 2000; … … 163 151 @Test 164 152 public void testSize_4() { 165 SymbolMap<String, String> symbolMap = 166 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 153 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 167 154 168 155 int entryCount = 2000; … … 182 169 @Test 183 170 public void testSize_5() { 184 SymbolMap<String, String> symbolMap = 185 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 171 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 186 172 187 173 int entryCount = 2000; … … 200 186 @Test 201 187 public void testIsEmpty_1() { 202 SymbolMap<String, String> symbolMap = 203 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 188 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 204 189 205 190 assertTrue(symbolMap.isEmpty()); … … 208 193 @Test 209 194 public void testIsEmpty_2() { 210 SymbolMap<String, String> symbolMap = 211 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 195 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 212 196 213 197 symbolMap.addSymbol("symbol1", "value1"); … … 218 202 @Test 219 203 public void testIsEmpty_3() { 220 SymbolMap<String, String> symbolMap = 221 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 204 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 222 205 223 206 int entryCount = 2000; … … 232 215 @Test 233 216 public void testIsEmpty_4() { 234 SymbolMap<String, String> symbolMap = 235 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 217 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 236 218 237 219 int entryCount = 2000; … … 251 233 @Test 252 234 public void testIsEmpty_5() { 253 SymbolMap<String, String> symbolMap = 254 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 235 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 255 236 256 237 int entryCount = 2000; … … 269 250 @Test 270 251 public void testContainsSymbol_1() { 271 SymbolMap<String, String> symbolMap = 272 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 252 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 273 253 274 254 assertFalse(symbolMap.containsSymbol("symbol")); … … 277 257 @Test 278 258 public void testContainsSymbol_2() { 279 SymbolMap<String, String> symbolMap = 280 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 259 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 281 260 282 261 symbolMap.addSymbol("symbol1", "value1"); … … 287 266 @Test 288 267 public void testContainsSymbol_3() { 289 SymbolMap<String, String> symbolMap = 290 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 268 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 291 269 292 270 int entryCount = 2000; … … 303 281 @Test 304 282 public void testContainsSymbol_4() { 305 SymbolMap<String, String> symbolMap = 306 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 283 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 307 284 308 285 int entryCount = 2000; … … 324 301 @Test 325 302 public void testContainsSymbol_5() { 326 SymbolMap<String, String> symbolMap = 327 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 303 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 328 304 329 305 int entryCount = 2000; … … 352 328 @Test(expected = java.lang.IllegalArgumentException.class) 353 329 public void testContainsSymbol_6() { 354 SymbolMap<String, String> symbolMap = 355 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 330 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 356 331 357 332 symbolMap.containsSymbol(null); … … 360 335 @Test 361 336 public void testGetValue_1() { 362 SymbolMap<String, String> symbolMap = 363 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 337 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 364 338 365 339 assertNull(symbolMap.getValue("symbol")); … … 368 342 @Test 369 343 public void testGetValue_2() { 370 SymbolMap<String, String> symbolMap = 371 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 344 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 372 345 373 346 symbolMap.addSymbol("symbol1", "value1"); … … 378 351 @Test 379 352 public void testGetValue_3() { 380 SymbolMap<String, String> symbolMap = 381 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 353 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 382 354 383 355 symbolMap.addSymbol("symbol1", null); … … 388 360 @Test 389 361 public void testGetValue_4() { 390 SymbolMap<String, String> symbolMap = 391 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 362 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 392 363 393 364 int entryCount = 2000; … … 404 375 @Test 405 376 public void testGetValue_5() { 406 SymbolMap<String, String> symbolMap = 407 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 377 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 408 378 409 379 int entryCount = 2000; … … 430 400 @Test 431 401 public void testGetValue_6() { 432 SymbolMap<String, String> symbolMap = 433 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 402 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 434 403 435 404 int entryCount = 2000; … … 458 427 @Test(expected = java.lang.IllegalArgumentException.class) 459 428 public void testGetValue_7() { 460 SymbolMap<String, String> symbolMap = 461 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 429 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 462 430 463 431 symbolMap.getValue(null); … … 466 434 @Test 467 435 public void testRemoveSymbol_1() { 468 SymbolMap<String, String> symbolMap = 469 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 436 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 470 437 471 438 assertNull(symbolMap.removeSymbol("symbol")); … … 474 441 @Test 475 442 public void testRemoveSymbol_2() { 476 SymbolMap<String, String> symbolMap = 477 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 443 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 478 444 479 445 symbolMap.addSymbol("symbol1", "value1"); … … 485 451 @Test 486 452 public void testRemoveSymbol_3() { 487 SymbolMap<String, String> symbolMap = 488 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 453 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 489 454 490 455 symbolMap.addSymbol("symbol1", null); … … 496 461 @Test 497 462 public void testRemoveSymbol_4() { 498 SymbolMap<String, String> symbolMap = 499 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 463 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 500 464 501 465 int entryCount = 2000; … … 514 478 @Test 515 479 public void testRemoveSymbol_5() { 516 SymbolMap<String, String> symbolMap = 517 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 480 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 518 481 519 482 int entryCount = 2000; … … 542 505 @Test 543 506 public void testRemoveSymbol_6() { 544 SymbolMap<String, String> symbolMap = 545 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 507 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 546 508 547 509 int entryCount = 2000; … … 572 534 @Test(expected = java.lang.IllegalArgumentException.class) 573 535 public void testRemoveSymbol_7() { 574 SymbolMap<String, String> symbolMap = 575 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 536 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 576 537 577 538 symbolMap.removeSymbol(null); … … 580 541 @Test 581 542 public void testGetSymbols_1() { 582 SymbolMap<String, String> symbolMap = 583 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 543 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 584 544 585 545 assertNotNull(symbolMap.getSymbols()); … … 589 549 @Test 590 550 public void testGetSymbols_2() { 591 SymbolMap<String, String> symbolMap = 592 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 551 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 593 552 594 553 symbolMap.addSymbol("symbol1", "value1"); … … 601 560 @Test 602 561 public void testGetSymbols_3() { 603 SymbolMap<String, String> symbolMap = 604 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 562 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 605 563 606 564 symbolMap.addSymbol("symbol1", null); … … 613 571 @Test 614 572 public void testGetSymbols_4() { 615 SymbolMap<String, String> symbolMap = 616 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 617 618 int entryCount = 2000; 619 620 for (int i = 0; i < entryCount; i++) { 621 symbolMap.addSymbol("symbol" + i, "value" + i); 573 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 574 Set<String> expectedSymbols = new HashSet<String>(); 575 576 int entryCount = 2000; 577 578 for (int i = 0; i < entryCount; i++) { 579 symbolMap.addSymbol("symbol" + i, "value" + i); 580 expectedSymbols.add("symbol" + i); 622 581 } 623 582 … … 628 587 for (int i = 0; i < entryCount; i++) { 629 588 assertTrue(iterator.hasNext()); 630 assertEquals("symbol" + i, iterator.next()); 631 } 632 589 expectedSymbols.remove(iterator.next()); 590 } 591 592 assertTrue(expectedSymbols.isEmpty()); 633 593 assertFalse(iterator.hasNext()); 634 594 } … … 636 596 @Test 637 597 public void testGetSymbols_5() { 638 SymbolMap<String, String> symbolMap = 639 new SymbolMap<String, String>(new DefaultSymbolComparator<String>());598 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 599 Set<String> expectedSymbols = new HashSet<String>(); 640 600 641 601 int entryCount = 2000; … … 644 604 if (i % 7 == 0) { 645 605 symbolMap.addSymbol("symbol" + i, "value" + i); 606 expectedSymbols.add("symbol" + i); 646 607 } 647 608 else { 648 609 symbolMap.addSymbol("symbol" + i, null); 610 expectedSymbols.add("symbol" + i); 649 611 } 650 612 } … … 656 618 for (int i = 0; i < entryCount; i++) { 657 619 assertTrue(iterator.hasNext()); 658 assertEquals("symbol" + i, iterator.next()); 659 } 660 620 expectedSymbols.remove(iterator.next()); 621 } 622 623 assertTrue(expectedSymbols.isEmpty()); 661 624 assertFalse(iterator.hasNext()); 662 625 } … … 664 627 @Test 665 628 public void testGetSymbols_6() { 666 SymbolMap<String, String> symbolMap = 667 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 668 669 int entryCount = 2000; 670 671 for (int i = 0; i < entryCount; i++) { 672 symbolMap.addSymbol("symbol" + i, "value" + i); 629 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 630 Set<String> expectedSymbols = new HashSet<String>(); 631 632 int entryCount = 2000; 633 634 for (int i = 0; i < entryCount; i++) { 635 symbolMap.addSymbol("symbol" + i, "value" + i); 636 expectedSymbols.add("symbol" + i); 673 637 } 674 638 675 639 for (int i = 150; i < (entryCount - 150); i++) { 676 640 symbolMap.removeSymbol("symbol" + i); 641 expectedSymbols.remove("symbol" + i); 677 642 } 678 643 … … 683 648 for (int i = 0; i < 2 * 150; i++) { 684 649 assertTrue(iterator.hasNext()); 685 686 if (i < 150) { 687 assertEquals("symbol" + i, iterator.next()); 688 } 689 else if (i >= 150){ 690 assertEquals("symbol" + (entryCount - 300 + i), iterator.next()); 691 } 692 } 693 650 expectedSymbols.remove(iterator.next()); 651 } 652 653 assertTrue(expectedSymbols.isEmpty()); 694 654 assertFalse(iterator.hasNext()); 695 655 } … … 697 657 @Test 698 658 public void testGetValues_1() { 699 SymbolMap<String, String> symbolMap = 700 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 659 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 701 660 702 661 assertNotNull(symbolMap.getValues()); … … 706 665 @Test 707 666 public void testGetValues_2() { 708 SymbolMap<String, String> symbolMap = 709 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 667 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 710 668 711 669 symbolMap.addSymbol("symbol1", "value1"); … … 718 676 @Test 719 677 public void testGetValues_3() { 720 SymbolMap<String, String> symbolMap = 721 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 678 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 722 679 723 680 symbolMap.addSymbol("symbol1", null); … … 730 687 @Test 731 688 public void testGetValues_4() { 732 SymbolMap<String, String> symbolMap = 733 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 734 735 int entryCount = 2000; 736 737 for (int i = 0; i < entryCount; i++) { 738 symbolMap.addSymbol("symbol" + i, "value" + i); 689 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 690 Set<String> expectedValues = new HashSet<String>(); 691 692 int entryCount = 2000; 693 694 for (int i = 0; i < entryCount; i++) { 695 symbolMap.addSymbol("symbol" + i, "value" + i); 696 expectedValues.add("value" + i); 739 697 } 740 698 … … 745 703 for (int i = 0; i < entryCount; i++) { 746 704 assertTrue(iterator.hasNext()); 747 assertEquals("value" + i, iterator.next()); 748 } 749 705 expectedValues.remove(iterator.next()); 706 } 707 708 assertTrue(expectedValues.isEmpty()); 750 709 assertFalse(iterator.hasNext()); 751 710 } … … 753 712 @Test 754 713 public void testGetValues_5() { 755 SymbolMap<String, String> symbolMap = 756 new SymbolMap<String, String>(new DefaultSymbolComparator<String>());714 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 715 Set<String> expectedValues = new HashSet<String>(); 757 716 758 717 int entryCount = 2000; … … 761 720 if (i % 7 == 0) { 762 721 symbolMap.addSymbol("symbol" + i, "value" + i); 722 expectedValues.add("value" + i); 763 723 } 764 724 else { 765 725 symbolMap.addSymbol("symbol" + i, null); 726 expectedValues.add(null); 766 727 } 767 728 } … … 773 734 for (int i = 0; i < entryCount; i++) { 774 735 assertTrue(iterator.hasNext()); 775 if (i % 7 == 0) { 776 assertEquals("value" + i, iterator.next()); 777 } 778 else { 779 assertNull(iterator.next()); 780 } 781 } 782 736 expectedValues.remove(iterator.next()); 737 } 738 739 assertTrue(expectedValues.isEmpty()); 783 740 assertFalse(iterator.hasNext()); 784 741 } … … 786 743 @Test 787 744 public void testGetValues_6() { 788 SymbolMap<String, String> symbolMap = 789 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 790 791 int entryCount = 2000; 792 793 for (int i = 0; i < entryCount; i++) { 794 symbolMap.addSymbol("symbol" + i, "value" + i); 745 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 746 Set<String> expectedValues = new HashSet<String>(); 747 748 int entryCount = 2000; 749 750 for (int i = 0; i < entryCount; i++) { 751 symbolMap.addSymbol("symbol" + i, "value" + i); 752 expectedValues.add("value" + i); 795 753 } 796 754 797 755 for (int i = 150; i < (entryCount - 150); i++) { 798 756 symbolMap.removeSymbol("symbol" + i); 757 expectedValues.remove("value" + i); 799 758 } 800 759 … … 805 764 for (int i = 0; i < 2 * 150; i++) { 806 765 assertTrue(iterator.hasNext()); 807 808 if (i < 150) { 809 assertEquals("value" + i, iterator.next()); 810 } 811 else if (i >= 150){ 812 assertEquals("value" + (entryCount - 300 + i), iterator.next()); 813 } 814 } 815 766 expectedValues.remove(iterator.next()); 767 } 768 769 assertTrue(expectedValues.isEmpty()); 816 770 assertFalse(iterator.hasNext()); 817 771 } … … 819 773 @Test 820 774 public void testClear_1() { 821 SymbolMap<String, String> symbolMap = 822 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 775 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 823 776 824 777 symbolMap.clear(); … … 828 781 @Test 829 782 public void testClear_2() { 830 SymbolMap<String, String> symbolMap = 831 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 783 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 832 784 833 785 symbolMap.addSymbol("symbol1", "value1"); … … 839 791 @Test 840 792 public void testClear_3() { 841 SymbolMap<String, String> symbolMap = 842 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 793 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 843 794 844 795 symbolMap.addSymbol("symbol1", null); … … 850 801 @Test 851 802 public void testClear_4() { 852 SymbolMap<String, String> symbolMap = 853 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 803 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 854 804 855 805 int entryCount = 2000; … … 865 815 @Test 866 816 public void testClear_5() { 867 SymbolMap<String, String> symbolMap = 868 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 817 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 869 818 870 819 int entryCount = 2000; … … 885 834 @Test 886 835 public void testClear_6() { 887 SymbolMap<String, String> symbolMap = 888 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 836 SymbolMap<String, String> symbolMap = new DefaultSymbolMap<String, String>(); 889 837 890 838 int entryCount = 2000; … … 904 852 @Test 905 853 public void testEquals_1() { 906 SymbolMap<String, String> symbolMap1 = 907 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 908 909 SymbolMap<String, String> symbolMap2 = 910 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 854 SymbolMap<String, String> symbolMap1 = new DefaultSymbolMap<String, String>(); 855 856 SymbolMap<String, String> symbolMap2 = new DefaultSymbolMap<String, String>(); 911 857 912 858 assertTrue(symbolMap1.equals(symbolMap2)); … … 915 861 @Test 916 862 public void testEquals_2() { 917 SymbolMap<String, String> symbolMap1 = 918 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 919 920 SymbolMap<String, String> symbolMap2 = 921 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 863 SymbolMap<String, String> symbolMap1 = new DefaultSymbolMap<String, String>(); 864 865 SymbolMap<String, String> symbolMap2 = new DefaultSymbolMap<String, String>(); 922 866 923 867 symbolMap1.addSymbol("symbol1", "value1"); … … 928 872 @Test 929 873 public void testEquals_3() { 930 SymbolMap<String, String> symbolMap1 = 931 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 932 933 SymbolMap<String, String> symbolMap2 = 934 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 874 SymbolMap<String, String> symbolMap1 = new DefaultSymbolMap<String, String>(); 875 876 SymbolMap<String, String> symbolMap2 = new DefaultSymbolMap<String, String>(); 935 877 936 878 symbolMap1.addSymbol("symbol1", "value1"); … … 942 884 @Test 943 885 public void testEquals_4() { 944 SymbolMap<String, String> symbolMap1 = 945 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 886 SymbolMap<String, String> symbolMap1 = new DefaultSymbolMap<String, String>(); 946 887 947 SymbolMap<String, String> symbolMap2 = 948 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 888 SymbolMap<String, String> symbolMap2 = new DefaultSymbolMap<String, String>(); 949 889 950 890 int entryCount = 200; … … 960 900 @Test 961 901 public void testEquals_5() { 962 SymbolMap<String, String> symbolMap1 = 963 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 902 SymbolMap<String, String> symbolMap1 = new DefaultSymbolMap<String, String>(); 964 903 965 SymbolMap<String, String> symbolMap2 = 966 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 904 SymbolMap<String, String> symbolMap2 = new DefaultSymbolMap<String, String>(); 967 905 968 906 int entryCount = 200; … … 986 924 @Test 987 925 public void testEquals_6() { 988 SymbolMap<String, String> symbolMap1 = 989 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 926 SymbolMap<String, String> symbolMap1 = new DefaultSymbolMap<String, String>(); 990 927 991 SymbolMap<String, String> symbolMap2 = 992 new SymbolMap<String, String>(new DefaultSymbolComparator<String>()); 928 SymbolMap<String, String> symbolMap2 = new DefaultSymbolMap<String, String>(); 993 929 994 930 int entryCount = 200; -
trunk/autoquest-core-usageprofiles-test/src/test/java/de/ugoe/cs/autoquest/usageprofiles/TrieTest.java
r1258 r1282 75 75 @Test(expected = java.lang.IllegalArgumentException.class) 76 76 public void testTrie_3() throws Exception { 77 new Trie<String>((Symbol Comparator<String>) null);77 new Trie<String>((SymbolStrategy<String>) null); 78 78 } 79 79
Note: See TracChangeset
for help on using the changeset viewer.