Skip to content

Instantly share code, notes, and snippets.

@virtix
Created June 16, 2010 11:30
Show Gist options
  • Select an option

  • Save virtix/440547 to your computer and use it in GitHub Desktop.

Select an option

Save virtix/440547 to your computer and use it in GitHub Desktop.
package edu.gmu.mut4j;
import static edu.gmu.mut4j.Mut4JAssertions.*;
import java.util.HashMap;
import org.junit.Test;
public class ExampleDBMutationTest {
@Test
public void testMyDAOMethod(){
//The SUT
MyDAO dao = new MyDAO();
//Instead of testing the DAO directly, wrap in mut4j
dao = (MyDAO) DBMutProxy.createProxy(dao);
//Execute a method with a JDBC call in the SUT and grab the results
HashMap results = dao.exec("some sql param");
assertMutantKilled( results );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment