Deprecated API


Contents
Deprecated Classes
org.junit.rules.ExpectedException
          Since 4.13 Assert.assertThrows can be used to verify that your code throws a specific exception. 
org.junit.matchers.JUnitMatchers
          use org.hamcrest.junit.JUnitMatchers 
org.junit.rules.RuleChain
          Since 4.13 ordering of rules can be naturally specified with an annotation attribute. 
org.junit.rules.TestWatchman
          Use TestWatcher (which implements TestRule) instead. 
 

Deprecated Methods
org.hamcrest.Matcher._dont_implement_Matcher___instead_extend_BaseMatcher_()
          to make 
org.hamcrest.BaseMatcher._dont_implement_Matcher___instead_extend_BaseMatcher_()
           
org.junit.Assert.assertEquals(double, double)
          Use assertEquals(double expected, double actual, double delta) instead 
org.junit.Assert.assertEquals(Object[], Object[])
          use assertArrayEquals 
org.junit.Assert.assertEquals(String, double, double)
          Use assertEquals(String message, double expected, double actual, double delta) instead 
org.junit.Assert.assertEquals(String, Object[], Object[])
          use assertArrayEquals 
org.junit.Assert.assertThat(String, T, Matcher)
          use org.hamcrest.junit.MatcherAssert.assertThat() 
org.junit.Assert.assertThat(T, Matcher)
          use org.hamcrest.junit.MatcherAssert.assertThat() 
org.junit.Assume.assumeThat(String, T, Matcher)
          use org.hamcrest.junit.MatcherAssume.assumeThat() 
org.junit.Assume.assumeThat(T, Matcher)
          use org.hamcrest.junit.MatcherAssume.assumeThat() 
org.junit.matchers.JUnitMatchers.both(Matcher)
          Please use CoreMatchers.both(Matcher) instead. 
org.junit.rules.ErrorCollector.checkThat(String, T, Matcher)
          use org.hamcrest.junit.ErrorCollector.checkThat() 
org.junit.rules.ErrorCollector.checkThat(T, Matcher)
          use org.hamcrest.junit.ErrorCollector.checkThat() 
org.junit.matchers.JUnitMatchers.containsString(String)
          Please use CoreMatchers.containsString(String) instead. 
org.junit.runners.ParentRunner.createTestClass(Class)
          Please use ParentRunner.ParentRunner(org.junit.runners.model.TestClass). 
org.junit.matchers.JUnitMatchers.either(Matcher)
          Please use CoreMatchers.either(Matcher) instead. 
org.junit.matchers.JUnitMatchers.everyItem(Matcher)
          Please use CoreMatchers.everyItem(Matcher) instead. 
org.junit.rules.ExpectedException.expect(Matcher)
          use org.hamcrest.junit.ExpectedException.expect() 
org.junit.rules.ExpectedException.expectCause(Matcher)
          use org.hamcrest.junit.ExpectedException.expectCause() 
org.junit.rules.ExpectedException.expectMessage(Matcher)
          use org.hamcrest.junit.ExpectedException.expectMessage() 
org.junit.experimental.max.MaxCore.forFolder(String)
          use storedLocally() 
org.junit.rules.ExpectedException.handleAssertionErrors()
          AssertionErrors are handled by default since JUnit 4.12. Just like in JUnit <= 4.10. 
org.junit.rules.ExpectedException.handleAssumptionViolatedExceptions()
          AssumptionViolatedExceptions are handled by default since JUnit 4.12. Just like in JUnit <= 4.10. 
org.junit.matchers.JUnitMatchers.hasItem(Matcher)
          Please use CoreMatchers.hasItem(Matcher) instead. 
org.junit.matchers.JUnitMatchers.hasItem(T)
          Please use CoreMatchers.hasItem(Object) instead. 
org.junit.matchers.JUnitMatchers.hasItems(Matcher...)
          Please use CoreMatchers.hasItems(Matcher...) instead. 
org.junit.matchers.JUnitMatchers.hasItems(T...)
          Please use CoreMatchers.hasItems(Object...) instead. 
org.hamcrest.CoreMatchers.is(Class)
          use isA(Class type) instead. 
org.hamcrest.core.Is.is(Class)
          use isA(Class type) instead. 
org.junit.runners.model.FrameworkMethod.producesType(Type)
          This is used only by the Theories runner, and does not use all the generic type info that it ought to. It will be replaced with a forthcoming ParameterSignature#canAcceptResultOf(FrameworkMethod) once Theories moves to junit-contrib. 
org.junit.rules.TestWatcher.skipped(AssumptionViolatedException, Description)
          use TestWatcher.skipped(AssumptionViolatedException, Description) 
org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(List)
            
org.junit.runners.BlockJUnit4ClassRunner.withPotentialTimeout(FrameworkMethod, Object, Statement)
            
 

Deprecated Constructors
org.junit.Assume()
          since 4.13. 
org.junit.AssumptionViolatedException(String, T, Matcher)
           
org.junit.AssumptionViolatedException(T, Matcher)
           
org.junit.experimental.categories.Categories.CategoryFilter(Class, Class)
           
org.junit.experimental.results.ResultMatchers()
          will be private soon. 
org.junit.rules.Timeout(int)
           
 



Copyright © 2002–2018 JUnit. All rights reserved.