2 * Svjatoslav Commons - shared library of common functionality.
3 * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
10 package eu.svjatoslav.commons.file;
13 import java.io.IOException;
15 import junit.framework.TestCase;
17 import org.junit.Test;
19 public class IOHelperTest extends TestCase {
22 public void testOverwriteFileIfContentDiffers() throws IOException {
23 final File file = new File("overrideTest.txt");
25 assertTrue(IOHelper.overwriteFileIfContentDiffers(file,
28 assertFalse(IOHelper.overwriteFileIfContentDiffers(file,
31 assertTrue(IOHelper.overwriteFileIfContentDiffers(file,