You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2014/06/10 01:27:11 UTC

[jira] [Closed] (ISIS-782) Integration testing framework should automatically install the FixtureClock singleton rather than the regular Clock

     [ https://issues.apache.org/jira/browse/ISIS-782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Haywood closed ISIS-782.
----------------------------


> Integration testing framework should automatically install the FixtureClock singleton rather than the regular Clock
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-782
>                 URL: https://issues.apache.org/jira/browse/ISIS-782
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: core-1.4.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: core-1.5.0
>
>
> The ClockService delegates to the Clock singleton.  If the absence of any explicit initialization, the Clock singleton lazily instantiates itself with a non-replaceable SystemClock that simply delegates to the system time.
> In integration tests, however, we should use FixtureClock.  The default behaviour of this is to act the same as the SystemClock, however it also exposes methods to allow the date/time to be set.  Once set, any call for the date/time is fixed.
> Currently, because of the way in which Isis bootstraps, by the time the test starts the Clock singleton has already been hit, meaning that it isn't possible for a developer-written fixture to install the FixtureClock explicitly.
> This ticket is for the testing framework (in IsisSystemForTest) to automatically install the FixtureClock on behalf of any tests that want to use it.



--
This message was sent by Atlassian JIRA
(v6.2#6252)