Created
June 16, 2010 11:30
-
-
Save virtix/440547 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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