Posted March 1, 201411 yr Howdy all I'm trying to set up unit testing for some of my classes (using JUnit) and it's doing my head in trying to set up the FMLLog so it doesn't crash when the class under test writes to it. eg if my class under test has if (!backupListing.hasKey(BACKUP_LISTING_VERSION_TAG) || !backupListing.hasKey(BACKUP_LISTING_PATHS_TAG)) { FMLLog.warning("Invalid backuplisting file (missing tag): " + backupListingPath.toString()); return retval; } then when it is called by my test class, it gives me a NullPointerException caused by this line in FMLRelaunchLog::configureLogging File logPath = new File(minecraftHome, logFileNamePattern); because minecraftHome and logFileNamePattern are both not set properly. I haven't been able to find a way to set them up. Anyone else figured out a straightforward way to do this? (Other than replacing all my calls to FMLLog with a wrapper, that is) -TGG
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.