The Artima Developer Community
Sponsored Link

Java Buzz Forum
Mock Java time and date using JMockIt

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
josef betancourt

Posts: 262
Nickname: averagejoe
Registered: Mar, 2013

josef betancourt is developer using Java and other stuff
Mock Java time and date using JMockIt Posted: May 4, 2014 3:56 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by josef betancourt.
Original Post: Mock Java time and date using JMockIt
Feed Title: T. C. Mits
Feed URL: http://octodecillion.com/feed/
Feed Description: Java development and other technology topics
Latest Java Buzz Posts
Latest Java Buzz Posts by josef betancourt
Latest Posts From T. C. Mits

Advertisement
A class under test (CUT) gets the current date and uses collaborating classes that invoke month dependent rules. How can it be unit tested? Sure you can get the current date in the test and set the month. But, the CUT and all of its collaborators may also get the current date. Without changing the [...]

Read: Mock Java time and date using JMockIt

Topic: Java Performance News April 2014 Previous Topic   Next Topic Topic: 5 reasons why Google can catch Amazon in the cloud

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use