<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Access IvyContext within a JUnit Test</title><link>https://answers.axonivy.com/questions/1773/access-ivycontext-within-a-junit-test</link><description>&lt;p&gt;I'm currently working on a JUnit Test that checks the values of Global Variables.
Now the problem is, if I try to get the Global Variable Value using this line of code: 
&lt;em&gt;String var = Ivy.var().get("BASEDEF_PORTAL_SESSION_TIMEOUT");&lt;/em&gt; the test immediately crashes.
Is there a way to access the IvyContext in a JUnit test.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1773/access-ivycontext-within-a-junit-test" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 31 May 2016 12:03:34 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1773/access-ivycontext-within-a-junit-test/1785</link><description>&lt;p&gt;Currently the access to the Ivy context is not weakly supported. But there is a solution documented here: &lt;a href="http://answers.axonivy.com/questions/166/solution-how-to-unit-test"&gt;http://answers.axonivy.com/questions/166/solution-how-to-unit-test&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 31 May 2016 12:03:34 -0400</pubDate><guid>https://answers.axonivy.com/questions/1773/access-ivycontext-within-a-junit-test/1785</guid></item></channel></rss>