Skip to content

Commit

Permalink
Merge pull request #4 from aslakknutsen/validation_test
Browse files Browse the repository at this point in the history
Add tests to verify method argument validation
  • Loading branch information
gastaldi committed Oct 6, 2013
2 parents 40ba5a8 + b13b184 commit 41e33fe
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.jboss.forge.furnace;

import java.io.File;

import org.jboss.forge.furnace.impl.FurnaceImpl;
import org.jboss.forge.furnace.repositories.AddonRepositoryMode;
import org.junit.Test;

public class FurnaceImplTest
{
@Test(expected = IllegalArgumentException.class)
public void shouldValidateAddRepositoryArgumentMode() throws Exception {
Furnace f = new FurnaceImpl();
f.addRepository(null, new File("."));
}

@Test(expected = IllegalArgumentException.class)
public void shouldValidateAddRepositoryArgumentDirectory() throws Exception {
Furnace f = new FurnaceImpl();
f.addRepository(AddonRepositoryMode.IMMUTABLE, null);
}
}

0 comments on commit 41e33fe

Please sign in to comment.