Changeset 1118 for trunk/autoquest-core-usageprofiles-test/src
- Timestamp:
- 03/06/13 23:38:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-usageprofiles-test/src/test/java/de/ugoe/cs/autoquest/usageprofiles/TrieTest.java
r1110 r1118 261 261 262 262 ListAssert.assertEquals(expected, result); 263 } 264 265 @Test 266 public void testProcessWithTrieProcessor_1() throws Exception { 267 Trie<String> fixture = new Trie<String>(); 268 fixture.train(sequence, 2); 269 270 final List<String> sequences = new ArrayList<String>(); 271 TrieProcessor<String> processor = new TrieProcessor<String>() { 272 @Override 273 public TrieProcessor.Result process(List<String> sequence, int count) { 274 sequences.add(count + "_" + sequence.toString()); 275 return TrieProcessor.Result.CONTINUE; 276 } 277 278 }; 279 280 fixture.process(processor); 281 282 List<String> expected = new ArrayList<String>(); 283 284 expected.add("5_[a]"); 285 expected.add("2_[a, b]"); 286 expected.add("2_[b]"); 287 expected.add("2_[b, r]"); 288 expected.add("2_[r]"); 289 expected.add("2_[r, a]"); 290 expected.add("1_[a, c]"); 291 expected.add("1_[c]"); 292 expected.add("1_[c, a]"); 293 expected.add("1_[a, d]"); 294 expected.add("1_[d]"); 295 expected.add("1_[d, a]"); 296 297 assertEquals(expected.size(), sequences.size()); 298 299 for (String sequence : sequences) { 300 ListAssert.assertContains(expected, sequence); 301 } 302 } 303 304 @Test 305 public void testProcessWithTrieProcessor_2() throws Exception { 306 Trie<String> fixture = new Trie<String>(); 307 fixture.train(sequence, 3); 308 309 final List<String> sequences = new ArrayList<String>(); 310 TrieProcessor<String> processor = new TrieProcessor<String>() { 311 @Override 312 public TrieProcessor.Result process(List<String> sequence, int count) { 313 sequences.add(count + "_" + sequence.toString()); 314 return TrieProcessor.Result.CONTINUE; 315 } 316 317 }; 318 319 fixture.process(processor); 320 321 List<String> expected = new ArrayList<String>(); 322 323 expected.add("5_[a]"); 324 expected.add("2_[a, b]"); 325 expected.add("2_[a, b, r]"); 326 expected.add("2_[b]"); 327 expected.add("2_[b, r]"); 328 expected.add("2_[b, r, a]"); 329 expected.add("2_[r]"); 330 expected.add("2_[r, a]"); 331 expected.add("1_[r, a, c]"); 332 expected.add("1_[a, c]"); 333 expected.add("1_[a, c, a]"); 334 expected.add("1_[c]"); 335 expected.add("1_[c, a]"); 336 expected.add("1_[c, a, d]"); 337 expected.add("1_[a, d]"); 338 expected.add("1_[a, d, a]"); 339 expected.add("1_[d]"); 340 expected.add("1_[d, a]"); 341 expected.add("1_[d, a, b]"); 342 343 assertEquals(expected.size(), sequences.size()); 344 345 for (String sequence : sequences) { 346 ListAssert.assertContains(expected, sequence); 347 } 348 } 349 350 @Test 351 public void testProcessWithTrieProcessor_3() throws Exception { 352 Trie<String> fixture = new Trie<String>(); 353 fixture.train(sequence, 4); 354 355 final List<String> sequences = new ArrayList<String>(); 356 TrieProcessor<String> processor = new TrieProcessor<String>() { 357 @Override 358 public TrieProcessor.Result process(List<String> sequence, int count) { 359 sequences.add(count + "_" + sequence.toString()); 360 return TrieProcessor.Result.CONTINUE; 361 } 362 363 }; 364 365 fixture.process(processor); 366 367 List<String> expected = new ArrayList<String>(); 368 369 expected.add("5_[a]"); 370 expected.add("2_[a, b]"); 371 expected.add("2_[a, b, r]"); 372 expected.add("2_[a, b, r, a]"); 373 expected.add("2_[b]"); 374 expected.add("2_[b, r]"); 375 expected.add("2_[b, r, a]"); 376 expected.add("1_[b, r, a, c]"); 377 expected.add("2_[r]"); 378 expected.add("2_[r, a]"); 379 expected.add("1_[r, a, c]"); 380 expected.add("1_[r, a, c, a]"); 381 expected.add("1_[a, c]"); 382 expected.add("1_[a, c, a]"); 383 expected.add("1_[a, c, a, d]"); 384 expected.add("1_[c]"); 385 expected.add("1_[c, a]"); 386 expected.add("1_[c, a, d]"); 387 expected.add("1_[c, a, d, a]"); 388 expected.add("1_[a, d]"); 389 expected.add("1_[a, d, a]"); 390 expected.add("1_[a, d, a, b]"); 391 expected.add("1_[d]"); 392 expected.add("1_[d, a]"); 393 expected.add("1_[d, a, b]"); 394 expected.add("1_[d, a, b, r]"); 395 396 assertEquals(expected.size(), sequences.size()); 397 398 for (String sequence : sequences) { 399 ListAssert.assertContains(expected, sequence); 400 } 401 } 402 403 @Test 404 public void testProcessWithTrieProcessor_4() throws Exception { 405 Trie<String> fixture = new Trie<String>(); 406 fixture.train(sequence, 5); 407 408 final List<String> sequences = new ArrayList<String>(); 409 TrieProcessor<String> processor = new TrieProcessor<String>() { 410 @Override 411 public TrieProcessor.Result process(List<String> sequence, int count) { 412 sequences.add(count + "_" + sequence.toString()); 413 return TrieProcessor.Result.CONTINUE; 414 } 415 416 }; 417 418 fixture.process(processor); 419 420 List<String> expected = new ArrayList<String>(); 421 422 expected.add("5_[a]"); 423 expected.add("2_[a, b]"); 424 expected.add("2_[a, b, r]"); 425 expected.add("2_[a, b, r, a]"); 426 expected.add("1_[a, b, r, a, c]"); 427 expected.add("2_[b]"); 428 expected.add("2_[b, r]"); 429 expected.add("2_[b, r, a]"); 430 expected.add("1_[b, r, a, c]"); 431 expected.add("1_[b, r, a, c, a]"); 432 expected.add("2_[r]"); 433 expected.add("2_[r, a]"); 434 expected.add("1_[r, a, c]"); 435 expected.add("1_[r, a, c, a]"); 436 expected.add("1_[r, a, c, a, d]"); 437 expected.add("1_[a, c]"); 438 expected.add("1_[a, c, a]"); 439 expected.add("1_[a, c, a, d]"); 440 expected.add("1_[a, c, a, d, a]"); 441 expected.add("1_[c]"); 442 expected.add("1_[c, a]"); 443 expected.add("1_[c, a, d]"); 444 expected.add("1_[c, a, d, a]"); 445 expected.add("1_[c, a, d, a, b]"); 446 expected.add("1_[a, d]"); 447 expected.add("1_[a, d, a]"); 448 expected.add("1_[a, d, a, b]"); 449 expected.add("1_[a, d, a, b, r]"); 450 expected.add("1_[d]"); 451 expected.add("1_[d, a]"); 452 expected.add("1_[d, a, b]"); 453 expected.add("1_[d, a, b, r]"); 454 expected.add("1_[d, a, b, r, a]"); 455 456 assertEquals(expected.size(), sequences.size()); 457 458 for (String sequence : sequences) { 459 ListAssert.assertContains(expected, sequence); 460 } 461 } 462 463 @Test 464 public void testProcessWithTrieProcessor_5() throws Exception { 465 Trie<String> fixture = new Trie<String>(); 466 fixture.train(sequence, 6); 467 468 final List<String> sequences = new ArrayList<String>(); 469 TrieProcessor<String> processor = new TrieProcessor<String>() { 470 @Override 471 public TrieProcessor.Result process(List<String> sequence, int count) { 472 sequences.add(count + "_" + sequence.toString()); 473 return TrieProcessor.Result.CONTINUE; 474 } 475 476 }; 477 478 fixture.process(processor); 479 480 List<String> expected = new ArrayList<String>(); 481 482 expected.add("5_[a]"); 483 expected.add("2_[a, b]"); 484 expected.add("2_[a, b, r]"); 485 expected.add("2_[a, b, r, a]"); 486 expected.add("1_[a, b, r, a, c]"); 487 expected.add("1_[a, b, r, a, c, a]"); 488 expected.add("2_[b]"); 489 expected.add("2_[b, r]"); 490 expected.add("2_[b, r, a]"); 491 expected.add("1_[b, r, a, c]"); 492 expected.add("1_[b, r, a, c, a]"); 493 expected.add("1_[b, r, a, c, a, d]"); 494 expected.add("2_[r]"); 495 expected.add("2_[r, a]"); 496 expected.add("1_[r, a, c]"); 497 expected.add("1_[r, a, c, a]"); 498 expected.add("1_[r, a, c, a, d]"); 499 expected.add("1_[r, a, c, a, d, a]"); 500 expected.add("1_[a, c]"); 501 expected.add("1_[a, c, a]"); 502 expected.add("1_[a, c, a, d]"); 503 expected.add("1_[a, c, a, d, a]"); 504 expected.add("1_[a, c, a, d, a, b]"); 505 expected.add("1_[c]"); 506 expected.add("1_[c, a]"); 507 expected.add("1_[c, a, d]"); 508 expected.add("1_[c, a, d, a]"); 509 expected.add("1_[c, a, d, a, b]"); 510 expected.add("1_[c, a, d, a, b, r]"); 511 expected.add("1_[a, d]"); 512 expected.add("1_[a, d, a]"); 513 expected.add("1_[a, d, a, b]"); 514 expected.add("1_[a, d, a, b, r]"); 515 expected.add("1_[a, d, a, b, r, a]"); 516 expected.add("1_[d]"); 517 expected.add("1_[d, a]"); 518 expected.add("1_[d, a, b]"); 519 expected.add("1_[d, a, b, r]"); 520 expected.add("1_[d, a, b, r, a]"); 521 522 assertEquals(expected.size(), sequences.size()); 523 524 for (String sequence : sequences) { 525 ListAssert.assertContains(expected, sequence); 526 } 527 } 528 529 @Test 530 public void testProcessWithTrieProcessor_6() throws Exception { 531 Trie<String> fixture = new Trie<String>(); 532 fixture.train(sequence, 7); 533 534 final List<String> sequences = new ArrayList<String>(); 535 TrieProcessor<String> processor = new TrieProcessor<String>() { 536 @Override 537 public TrieProcessor.Result process(List<String> sequence, int count) { 538 sequences.add(count + "_" + sequence.toString()); 539 return TrieProcessor.Result.CONTINUE; 540 } 541 542 }; 543 544 fixture.process(processor); 545 546 List<String> expected = new ArrayList<String>(); 547 548 expected.add("5_[a]"); 549 expected.add("2_[a, b]"); 550 expected.add("2_[a, b, r]"); 551 expected.add("2_[a, b, r, a]"); 552 expected.add("1_[a, b, r, a, c]"); 553 expected.add("1_[a, b, r, a, c, a]"); 554 expected.add("1_[a, b, r, a, c, a, d]"); 555 expected.add("2_[b]"); 556 expected.add("2_[b, r]"); 557 expected.add("2_[b, r, a]"); 558 expected.add("1_[b, r, a, c]"); 559 expected.add("1_[b, r, a, c, a]"); 560 expected.add("1_[b, r, a, c, a, d]"); 561 expected.add("1_[b, r, a, c, a, d, a]"); 562 expected.add("2_[r]"); 563 expected.add("2_[r, a]"); 564 expected.add("1_[r, a, c]"); 565 expected.add("1_[r, a, c, a]"); 566 expected.add("1_[r, a, c, a, d]"); 567 expected.add("1_[r, a, c, a, d, a]"); 568 expected.add("1_[r, a, c, a, d, a, b]"); 569 expected.add("1_[a, c]"); 570 expected.add("1_[a, c, a]"); 571 expected.add("1_[a, c, a, d]"); 572 expected.add("1_[a, c, a, d, a]"); 573 expected.add("1_[a, c, a, d, a, b]"); 574 expected.add("1_[a, c, a, d, a, b, r]"); 575 expected.add("1_[c]"); 576 expected.add("1_[c, a]"); 577 expected.add("1_[c, a, d]"); 578 expected.add("1_[c, a, d, a]"); 579 expected.add("1_[c, a, d, a, b]"); 580 expected.add("1_[c, a, d, a, b, r]"); 581 expected.add("1_[c, a, d, a, b, r, a]"); 582 expected.add("1_[a, d]"); 583 expected.add("1_[a, d, a]"); 584 expected.add("1_[a, d, a, b]"); 585 expected.add("1_[a, d, a, b, r]"); 586 expected.add("1_[a, d, a, b, r, a]"); 587 expected.add("1_[d]"); 588 expected.add("1_[d, a]"); 589 expected.add("1_[d, a, b]"); 590 expected.add("1_[d, a, b, r]"); 591 expected.add("1_[d, a, b, r, a]"); 592 593 assertEquals(expected.size(), sequences.size()); 594 595 for (String sequence : sequences) { 596 ListAssert.assertContains(expected, sequence); 597 } 598 } 599 600 @Test 601 public void testProcessWithTrieProcessor_7() throws Exception { 602 Trie<String> fixture = new Trie<String>(); 603 fixture.train(sequence, 8); 604 605 final List<String> sequences = new ArrayList<String>(); 606 TrieProcessor<String> processor = new TrieProcessor<String>() { 607 @Override 608 public TrieProcessor.Result process(List<String> sequence, int count) { 609 sequences.add(count + "_" + sequence.toString()); 610 return TrieProcessor.Result.CONTINUE; 611 } 612 613 }; 614 615 fixture.process(processor); 616 617 List<String> expected = new ArrayList<String>(); 618 619 expected.add("5_[a]"); 620 expected.add("2_[a, b]"); 621 expected.add("2_[a, b, r]"); 622 expected.add("2_[a, b, r, a]"); 623 expected.add("1_[a, b, r, a, c]"); 624 expected.add("1_[a, b, r, a, c, a]"); 625 expected.add("1_[a, b, r, a, c, a, d]"); 626 expected.add("1_[a, b, r, a, c, a, d, a]"); 627 expected.add("2_[b]"); 628 expected.add("2_[b, r]"); 629 expected.add("2_[b, r, a]"); 630 expected.add("1_[b, r, a, c]"); 631 expected.add("1_[b, r, a, c, a]"); 632 expected.add("1_[b, r, a, c, a, d]"); 633 expected.add("1_[b, r, a, c, a, d, a]"); 634 expected.add("1_[b, r, a, c, a, d, a, b]"); 635 expected.add("2_[r]"); 636 expected.add("2_[r, a]"); 637 expected.add("1_[r, a, c]"); 638 expected.add("1_[r, a, c, a]"); 639 expected.add("1_[r, a, c, a, d]"); 640 expected.add("1_[r, a, c, a, d, a]"); 641 expected.add("1_[r, a, c, a, d, a, b]"); 642 expected.add("1_[r, a, c, a, d, a, b, r]"); 643 expected.add("1_[a, c]"); 644 expected.add("1_[a, c, a]"); 645 expected.add("1_[a, c, a, d]"); 646 expected.add("1_[a, c, a, d, a]"); 647 expected.add("1_[a, c, a, d, a, b]"); 648 expected.add("1_[a, c, a, d, a, b, r]"); 649 expected.add("1_[a, c, a, d, a, b, r, a]"); 650 expected.add("1_[c]"); 651 expected.add("1_[c, a]"); 652 expected.add("1_[c, a, d]"); 653 expected.add("1_[c, a, d, a]"); 654 expected.add("1_[c, a, d, a, b]"); 655 expected.add("1_[c, a, d, a, b, r]"); 656 expected.add("1_[c, a, d, a, b, r, a]"); 657 expected.add("1_[a, d]"); 658 expected.add("1_[a, d, a]"); 659 expected.add("1_[a, d, a, b]"); 660 expected.add("1_[a, d, a, b, r]"); 661 expected.add("1_[a, d, a, b, r, a]"); 662 expected.add("1_[d]"); 663 expected.add("1_[d, a]"); 664 expected.add("1_[d, a, b]"); 665 expected.add("1_[d, a, b, r]"); 666 expected.add("1_[d, a, b, r, a]"); 667 668 assertEquals(expected.size(), sequences.size()); 669 670 for (String sequence : sequences) { 671 ListAssert.assertContains(expected, sequence); 672 } 673 } 674 675 @Test 676 public void testProcessWithTrieProcessor_8() throws Exception { 677 Trie<String> fixture = new Trie<String>(); 678 fixture.train(sequence, 9); 679 680 final List<String> sequences = new ArrayList<String>(); 681 TrieProcessor<String> processor = new TrieProcessor<String>() { 682 @Override 683 public TrieProcessor.Result process(List<String> sequence, int count) { 684 sequences.add(count + "_" + sequence.toString()); 685 return TrieProcessor.Result.CONTINUE; 686 } 687 688 }; 689 690 fixture.process(processor); 691 692 List<String> expected = new ArrayList<String>(); 693 694 expected.add("5_[a]"); 695 expected.add("2_[a, b]"); 696 expected.add("2_[a, b, r]"); 697 expected.add("2_[a, b, r, a]"); 698 expected.add("1_[a, b, r, a, c]"); 699 expected.add("1_[a, b, r, a, c, a]"); 700 expected.add("1_[a, b, r, a, c, a, d]"); 701 expected.add("1_[a, b, r, a, c, a, d, a]"); 702 expected.add("1_[a, b, r, a, c, a, d, a, b]"); 703 expected.add("2_[b]"); 704 expected.add("2_[b, r]"); 705 expected.add("2_[b, r, a]"); 706 expected.add("1_[b, r, a, c]"); 707 expected.add("1_[b, r, a, c, a]"); 708 expected.add("1_[b, r, a, c, a, d]"); 709 expected.add("1_[b, r, a, c, a, d, a]"); 710 expected.add("1_[b, r, a, c, a, d, a, b]"); 711 expected.add("1_[b, r, a, c, a, d, a, b, r]"); 712 expected.add("2_[r]"); 713 expected.add("2_[r, a]"); 714 expected.add("1_[r, a, c]"); 715 expected.add("1_[r, a, c, a]"); 716 expected.add("1_[r, a, c, a, d]"); 717 expected.add("1_[r, a, c, a, d, a]"); 718 expected.add("1_[r, a, c, a, d, a, b]"); 719 expected.add("1_[r, a, c, a, d, a, b, r]"); 720 expected.add("1_[r, a, c, a, d, a, b, r, a]"); 721 expected.add("1_[a, c]"); 722 expected.add("1_[a, c, a]"); 723 expected.add("1_[a, c, a, d]"); 724 expected.add("1_[a, c, a, d, a]"); 725 expected.add("1_[a, c, a, d, a, b]"); 726 expected.add("1_[a, c, a, d, a, b, r]"); 727 expected.add("1_[a, c, a, d, a, b, r, a]"); 728 expected.add("1_[c]"); 729 expected.add("1_[c, a]"); 730 expected.add("1_[c, a, d]"); 731 expected.add("1_[c, a, d, a]"); 732 expected.add("1_[c, a, d, a, b]"); 733 expected.add("1_[c, a, d, a, b, r]"); 734 expected.add("1_[c, a, d, a, b, r, a]"); 735 expected.add("1_[a, d]"); 736 expected.add("1_[a, d, a]"); 737 expected.add("1_[a, d, a, b]"); 738 expected.add("1_[a, d, a, b, r]"); 739 expected.add("1_[a, d, a, b, r, a]"); 740 expected.add("1_[d]"); 741 expected.add("1_[d, a]"); 742 expected.add("1_[d, a, b]"); 743 expected.add("1_[d, a, b, r]"); 744 expected.add("1_[d, a, b, r, a]"); 745 746 assertEquals(expected.size(), sequences.size()); 747 748 for (String sequence : sequences) { 749 ListAssert.assertContains(expected, sequence); 750 } 751 } 752 753 @Test 754 public void testProcessWithTrieProcessor_9() throws Exception { 755 Trie<String> fixture = new Trie<String>(); 756 fixture.train(sequence, 10); 757 758 final List<String> sequences = new ArrayList<String>(); 759 TrieProcessor<String> processor = new TrieProcessor<String>() { 760 @Override 761 public TrieProcessor.Result process(List<String> sequence, int count) { 762 sequences.add(count + "_" + sequence.toString()); 763 return TrieProcessor.Result.CONTINUE; 764 } 765 766 }; 767 768 fixture.process(processor); 769 770 List<String> expected = new ArrayList<String>(); 771 772 expected.add("5_[a]"); 773 expected.add("2_[a, b]"); 774 expected.add("2_[a, b, r]"); 775 expected.add("2_[a, b, r, a]"); 776 expected.add("1_[a, b, r, a, c]"); 777 expected.add("1_[a, b, r, a, c, a]"); 778 expected.add("1_[a, b, r, a, c, a, d]"); 779 expected.add("1_[a, b, r, a, c, a, d, a]"); 780 expected.add("1_[a, b, r, a, c, a, d, a, b]"); 781 expected.add("1_[a, b, r, a, c, a, d, a, b, r]"); 782 expected.add("2_[b]"); 783 expected.add("2_[b, r]"); 784 expected.add("2_[b, r, a]"); 785 expected.add("1_[b, r, a, c]"); 786 expected.add("1_[b, r, a, c, a]"); 787 expected.add("1_[b, r, a, c, a, d]"); 788 expected.add("1_[b, r, a, c, a, d, a]"); 789 expected.add("1_[b, r, a, c, a, d, a, b]"); 790 expected.add("1_[b, r, a, c, a, d, a, b, r]"); 791 expected.add("1_[b, r, a, c, a, d, a, b, r, a]"); 792 expected.add("2_[r]"); 793 expected.add("2_[r, a]"); 794 expected.add("1_[r, a, c]"); 795 expected.add("1_[r, a, c, a]"); 796 expected.add("1_[r, a, c, a, d]"); 797 expected.add("1_[r, a, c, a, d, a]"); 798 expected.add("1_[r, a, c, a, d, a, b]"); 799 expected.add("1_[r, a, c, a, d, a, b, r]"); 800 expected.add("1_[r, a, c, a, d, a, b, r, a]"); 801 expected.add("1_[a, c]"); 802 expected.add("1_[a, c, a]"); 803 expected.add("1_[a, c, a, d]"); 804 expected.add("1_[a, c, a, d, a]"); 805 expected.add("1_[a, c, a, d, a, b]"); 806 expected.add("1_[a, c, a, d, a, b, r]"); 807 expected.add("1_[a, c, a, d, a, b, r, a]"); 808 expected.add("1_[c]"); 809 expected.add("1_[c, a]"); 810 expected.add("1_[c, a, d]"); 811 expected.add("1_[c, a, d, a]"); 812 expected.add("1_[c, a, d, a, b]"); 813 expected.add("1_[c, a, d, a, b, r]"); 814 expected.add("1_[c, a, d, a, b, r, a]"); 815 expected.add("1_[a, d]"); 816 expected.add("1_[a, d, a]"); 817 expected.add("1_[a, d, a, b]"); 818 expected.add("1_[a, d, a, b, r]"); 819 expected.add("1_[a, d, a, b, r, a]"); 820 expected.add("1_[d]"); 821 expected.add("1_[d, a]"); 822 expected.add("1_[d, a, b]"); 823 expected.add("1_[d, a, b, r]"); 824 expected.add("1_[d, a, b, r, a]"); 825 826 assertEquals(expected.size(), sequences.size()); 827 828 for (String sequence : sequences) { 829 ListAssert.assertContains(expected, sequence); 830 } 831 } 832 833 834 @Test 835 public void testProcessWithTrieProcessor_10() throws Exception { 836 Trie<String> fixture = new Trie<String>(); 837 fixture.train(sequence, 11); 838 839 final List<String> sequences = new ArrayList<String>(); 840 TrieProcessor<String> processor = new TrieProcessor<String>() { 841 @Override 842 public TrieProcessor.Result process(List<String> sequence, int count) { 843 sequences.add(count + "_" + sequence.toString()); 844 return TrieProcessor.Result.CONTINUE; 845 } 846 847 }; 848 849 fixture.process(processor); 850 851 List<String> expected = new ArrayList<String>(); 852 853 expected.add("5_[a]"); 854 expected.add("2_[a, b]"); 855 expected.add("2_[a, b, r]"); 856 expected.add("2_[a, b, r, a]"); 857 expected.add("1_[a, b, r, a, c]"); 858 expected.add("1_[a, b, r, a, c, a]"); 859 expected.add("1_[a, b, r, a, c, a, d]"); 860 expected.add("1_[a, b, r, a, c, a, d, a]"); 861 expected.add("1_[a, b, r, a, c, a, d, a, b]"); 862 expected.add("1_[a, b, r, a, c, a, d, a, b, r]"); 863 expected.add("1_[a, b, r, a, c, a, d, a, b, r, a]"); 864 expected.add("2_[b]"); 865 expected.add("2_[b, r]"); 866 expected.add("2_[b, r, a]"); 867 expected.add("1_[b, r, a, c]"); 868 expected.add("1_[b, r, a, c, a]"); 869 expected.add("1_[b, r, a, c, a, d]"); 870 expected.add("1_[b, r, a, c, a, d, a]"); 871 expected.add("1_[b, r, a, c, a, d, a, b]"); 872 expected.add("1_[b, r, a, c, a, d, a, b, r]"); 873 expected.add("1_[b, r, a, c, a, d, a, b, r, a]"); 874 expected.add("2_[r]"); 875 expected.add("2_[r, a]"); 876 expected.add("1_[r, a, c]"); 877 expected.add("1_[r, a, c, a]"); 878 expected.add("1_[r, a, c, a, d]"); 879 expected.add("1_[r, a, c, a, d, a]"); 880 expected.add("1_[r, a, c, a, d, a, b]"); 881 expected.add("1_[r, a, c, a, d, a, b, r]"); 882 expected.add("1_[r, a, c, a, d, a, b, r, a]"); 883 expected.add("1_[a, c]"); 884 expected.add("1_[a, c, a]"); 885 expected.add("1_[a, c, a, d]"); 886 expected.add("1_[a, c, a, d, a]"); 887 expected.add("1_[a, c, a, d, a, b]"); 888 expected.add("1_[a, c, a, d, a, b, r]"); 889 expected.add("1_[a, c, a, d, a, b, r, a]"); 890 expected.add("1_[c]"); 891 expected.add("1_[c, a]"); 892 expected.add("1_[c, a, d]"); 893 expected.add("1_[c, a, d, a]"); 894 expected.add("1_[c, a, d, a, b]"); 895 expected.add("1_[c, a, d, a, b, r]"); 896 expected.add("1_[c, a, d, a, b, r, a]"); 897 expected.add("1_[a, d]"); 898 expected.add("1_[a, d, a]"); 899 expected.add("1_[a, d, a, b]"); 900 expected.add("1_[a, d, a, b, r]"); 901 expected.add("1_[a, d, a, b, r, a]"); 902 expected.add("1_[d]"); 903 expected.add("1_[d, a]"); 904 expected.add("1_[d, a, b]"); 905 expected.add("1_[d, a, b, r]"); 906 expected.add("1_[d, a, b, r, a]"); 907 908 assertEquals(expected.size(), sequences.size()); 909 910 for (String sequence : sequences) { 911 ListAssert.assertContains(expected, sequence); 912 } 263 913 } 264 914
Note: See TracChangeset
for help on using the changeset viewer.