Skip to content

www.rolfje.com

Tag: junit

Changing the Order of your UnitTests

Posted on 2011-04-01 By rolfje No Comments on Changing the Order of your UnitTests

A few months ago we had a problem where Eclipse could not automatically run all jUnit unit tests in a package if that package references a class called “enum”, which is a reserved word in Java 1.6. I’ll spare you the details, but we were forced to create a TestSuite. Normally we avoid this construction because it’s easy to create a new unit test and forget to add it to the correct TestSuit. So as a workaround we wrote some code which could build and return a TestSuite dynamically. Right-click in eclipse, select “Run as Unittest”, sit back and enjoy.

Lately this piece of code came in handy while testing another application, which required the removal of data from a database. Yes I know, Unittests should maybe not depend on databases because it leans towards integration testing, but here we are, and I need to solve it. I used the old TestSuite code and changed it so that the TestCase I needed to run first was singled out, while still maintaining the functionality of auto-detecting testcases in the source folder.

Read More “Changing the Order of your UnitTests” »

Software

Micro Victories

Posted on 2008-12-11 By rolfje 1 Comment on Micro Victories

TrophyThe last few weeks I was frustrated about not being able to write any code for the project I am on at work. My days are filled with email, spreadsheets, documents, discussions and distractions. All important stuff, I’m sure, but none of it has got to do with actual coding.

I tried to write code during the evenings for that project, just to get my kicks. Two things happened:

  1. Frustration grew, because I feel that this is the kind of work I should be doing during the day. 
  2. As I worked the late night hours, I realized I could never get it all done because the blocks of work were simply to large and required too much research to be done during a few evenings.

Read More “Micro Victories” »

Software
           

Recent Comments

  • rolfje on Methode Buijs uitgelegd
  • LinkedIn is at Peak Enshittifaction – Will Chatham's Blog on Linked-In not really Opt-in?
  • Hans j on 1N4148 diode as RF switch
  • Roaming Rhonda on DLNA on OSX, done right
  • Frans on How to fix a Krups XN2001 Nespresso machine

Tags

Anonimatron Apple backup design DIY DRM eclipse environment Fun gmail google hacking hamradio Hardware helicopter iphone ipod iTunes Java Keynote maven modelling motorcycle music news opinion oracle osx photo photography programming repair review security Software Steve Jobs T-Mobile technology Time Machine Ubuntu usability Utilities vacation windows Workshop

Categories

  • Apple (105)
  • Divorce (1)
  • Electronics (3)
  • Fun (57)
  • Games (7)
  • Hardware (72)
  • Microsoft (18)
  • Racing (14)
  • Software (134)
  • Uncategorized (65)
  • Workshop (20)

Archives

Copyright © 2025 www.rolfje.com.

Powered by PressBook WordPress theme