You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/05/16 13:22:39 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13998548#comment-13998548 ]
ASF subversion and git services commented on ISIS-782:
------------------------------------------------------
Commit f67aa096f668307041f54a82ae0d45c4ec665890 in isis's branch refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=f67aa09 ]
ISIS-782: install FixtureClock in IsisSystemForTest
> 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.4.2
>
>
> 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)