package water.cookbook;

import org.junit.*;
import water.*;
import water.fvec.*;
import water.util.Log;
import water.util.RemoveAllKeysTask;

public class Cookbook extends TestUtil {
  @Before
  public void removeAllKeys() {
    Log.info("Removing all keys...");
    RemoveAllKeysTask collector = new RemoveAllKeysTask();
    collector.invokeOnAllNodes();
    Log.info("Removed all keys.");
  }

  @Test
  public void testWillFail() {
    throw new RuntimeException("first test fails");
  }

  // ---
  // Test flow-coding a filter & group-by computing e.g. mean
  @Test
  public void testBasic() {
    Key k = Key.make("cars.hex");
    Frame fr = parseFrame(k, "smalldata/cars.csv");
    //Frame fr = parseFrame(k, "../datasets/UCI/UCI-large/covtype/covtype.data");
    // Call into another class so we do not need to weave anything in this class
    // when run as a JUnit
    Cookbook2.basicStatic(k, fr);
  }

  @Test
  public void testWillFail2() {
    throw new RuntimeException("3 test fails");
  }
}

@@ -386,32 +386,34 @@
 ys.%22);%0A  %7D%0A%0A
+//
   @Test%0A
   public voi
@@ -392,32 +392,34 @@
 %0A  %7D%0A%0A//  @Test%0A
+//
   public void te
@@ -429,24 +429,26 @@
 illFail() %7B%0A
+//
     throw ne
@@ -483,24 +483,26 @@
 st fails%22);%0A
+//
   %7D%0A%0A  // --
@@ -916,24 +916,26 @@
 );%0A  %7D%0A%0A
+//
   @Test%0A
   public
@@ -918,32 +918,34 @@
 %0A  %7D%0A%0A//  @Test%0A
+//
   public void te
@@ -956,24 +956,26 @@
 llFail2() %7B%0A
+//
     throw ne
@@ -1006,18 +1006,20 @@
 st fails%22);%0A
+//
   %7D%0A%7D%0A

Comment out tests that fail intentionally (for testing purposes).