Permalink
Browse files

Figiting with stupid main class

  • Loading branch information...
Briggs
Briggs committed Jan 5, 2012
1 parent 19e7fe5 commit e2a9a76bdcf9cc38b5cc613baa5aaf75d89bac5e
@@ -38,7 +38,6 @@ public static void main(String[] args) {
for (int i = 0; i < 400; i++) {
final int ran = (int) (Math.random() * 3);
final String randomString = random[ran].nextString();
- System.out.println(randomString);
blocks.add(new StringBlock(randomString));
}
@@ -47,10 +46,8 @@ public static void main(String[] args) {
final String ignoreMe = "This is an annoyingly long string that will no fit in any bins, so" +
" we should have an ignored block";
- StringBlock block = new StringBlock("This is an annoyingly long string that will no fit in any bins, so" +
- " we should have an ignored block");
-
- blocks.add(block);
+ blocks.add(new StringBlock("This is an annoyingly long string that will no fit in any bins, so" +
+ " we should have an ignored block"));
VetoableBlockBinPacker<StringBlock> packer = new VetoableBlockBinPacker<StringBlock>(blocks, 60, 10);
@@ -65,7 +62,7 @@ public void itemAdded(final BinEvent event) {
public void itemIgnored(final BinEvent event) {
System.out.println("Item ignored");
- if (ignoreMe.equals(event.getSource())) {
+ if (ignoreMe.equals(event.getBlock().getData())) {
System.out.println("Expected item was ignored.");
} else {
System.out.println("Whe we have tests, this would be a failure");
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit e2a9a76

Please sign in to comment.