git log <filename>What has changed:git log -p <filename>To see more options:git help logThere is also a nice tool to browse the commits visually:
gitk
git log <filename>What has changed:git log -p <filename>To see more options:git help loggitk
1: public class MyStaticClass {
2: static boolean doSomethingCrazy() {
3: return true;
4: }
5: }
1: import static org.junit.Assert.assertFalse;
2: import org.junit.*;
3: import mockit.*;
4: public class StaticTest {
5: @Mocked
6: MyStaticClass myClass;
7: @Test
8: public void testMakeConnection(){
9: new NonStrictExpectations(){
10: // MyStaticClass is mocked here
11: {
12: MyStaticClass.doSomethingCrazy();
13: returns(false);
14: }
15: };
16: boolean wasItCrazy = MyStaticClass.doSomethingCrazy();
17: assertFalse(wasItCrazy);
18: new Verifications() {{
19: MyStaticClass.doSomethingCrazy(); times = 1;
20: }};
21: }
22: }