Mockito

A-P-I發表於2024-04-21

MockStatic

  • close

  MockStatic<TestClass> tc = Mockito.mockStatic(TestClass.class);

tc.close();

  • try-catch

  try(MockStatic<TestClass> tc = Mockito.mockStatic(TestClass.class)) {

tc.when...

}

相關文章