I am using Application Test Framework for junits, So in one of the VOTest.xml i am trying to fetch the EO validation error but not able to get it.I've mentioned the piece code below and exception stack trace as well.
<method name="attributeCreateValidators">
<test-case name="attributeCreateValidatorName">
<params>
<param name="StartDate" type="String">2016-11-22</param>
<param name="EndDate" type="String">2016-11-20</param>
</params>
<asserts>
<assert name="ExceptionClass" type="String" action="EQUALS">oracle.jbo.RowValException</assert>
<assert name="ExceptionMessage" type="String" action="EQUALS">WLF:::WLF_LEARNTOP_SPE_START_DATE</assert>
</asserts>
</test-case>
</method>
Exception:
java.lang.AssertionError: Test Owner: ***REMOVED*** attributeCreateValidatorName: Exception expected but not thrown
java.lang.AssertionError: attributeCreateValidatorName: Exception expected but not thrown
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.junit.Assert.assertFalse(Assert.java:68)
at oracle.apps.financials.commonTest.util.UnitTestHelper.handleExceptionNotThrownWhenExpected(UnitTestHelper.java:189)
at oracle.apps.financials.commonTest.util.UnitTestHelper.runAttributeValidatorTestsJTestCaseInstance(UnitTestHelper.java:767)
at oracle.apps.common.applicationsTestFramework.service.view.AtfAbstractUpdateableVOTest.attributeCreateValidators(AtfAbstractUpdateableVOTest.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at oracle.jdevimpl.junit.runner.junit4.JUnit4Testable.run(JUnit4Testable.java:24)
at oracle.jdevimpl.junit.runner.TestExecution.run(TestExecution.java:27)
at oracle.jdevimpl.junit.runner.JUnitTestRunner.main(JUnitTestRunner.java:88)
***Moderator action (Timo): removed an email address from the post! User please make sure that you don't post email addresses in hte post or at part of the code!***