Skip to content

SEGBK/term-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libRecipe Build Status

Library for term project.

Complete API reference available here.

Using the library

A prebuilt jar file is available in librecipe.jar.

To use, include this jar file as well as all jar files in lib/ in your classpath when compiling and running your own code.

Sample code

There is sample code available for learning about how to use the library in Sample.java. This is very arbitrary and not very complete.

To run this, simply run make or make all.

Building the library

To compile the library, run make jar. To compile the library from scratch, run make clean && make jar.

Running tests

To run all unit tests, run make test.

Creating new tests

To create new tests, add a new file into the test/ directory with a meaningful name that ends with 'Test.java'.

For example, if you were testing the Recipe class, name your test class 'RecipeTest.java'.

The base code of your test class should be:

package test;

import test.util.*;

// import classes from the 'librecipe' that you want
// to test, but do not import more than you really need
//import librecipe.Recipe;

public class RecipeTest {
  public RecipeTest() {
    // change this to a meaninful name for your test
    super("the name of your test");
  }

  public void test(Runnable end) throws Throwable {
    // always call this line when you are done testing
    end.run();
  }
}

Adding new tests to the runner

To add a new test to the test runner, edit the file test/util/Runner.java and in the array of tests, instantiate your test class.

For example, you can add: new RecipeTest() for the test class above.

About

Recipe planner app for SEG2105 (uOttawa).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages