Skip to content
Browse files

Figiting with stupid main class

  • Loading branch information...
1 parent 19e7fe5 commit e2a9a76bdcf9cc38b5cc613baa5aaf75d89bac5e Briggs committed Jan 5, 2012
View
9 src/main/test/com/acidblue/collections/binpack/Main.java
@@ -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");
View
BIN target/classes/com/acidblue/collections/binpack/AbstractBinPacker.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/BadBlock.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/BadDataBlock.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/Bin.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/BinEvent.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/BinEventListener.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/BinPacker.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/Block.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/BlockAnalyzer.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/DataBlock.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/FirstFitBinPacker$1.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/FirstFitBinPacker.class
Binary file not shown.
View
BIN target/classes/com/acidblue/collections/binpack/VetoableBlockBinPacker.class
Binary file not shown.
View
BIN target/test-classes/com/acidblue/collections/binpack/Main$1.class
Binary file not shown.
View
BIN target/test-classes/com/acidblue/collections/binpack/Main$RandomStringGenerator.class
Binary file not shown.
View
BIN target/test-classes/com/acidblue/collections/binpack/Main$StringBlock.class
Binary file not shown.
View
BIN target/test-classes/com/acidblue/collections/binpack/Main.class
Binary file not shown.

0 comments on commit e2a9a76

Please sign in to comment.
Something went wrong with that request. Please try again.