#1659
Random Post :
- Install DSM 5.1 in VMware ESXi | XPEnology.me
- Turn On or Off Language Bar and Input Indicator in Windows 10 | Tutorials
- [JUnit] Parametrized Test
- Increasing the Base Device Size on Docker Daemon Restart
- [JUnit] Test System.err and System.out content
#2296
How to Turn On or Off Language Bar and Input Indicator in Windows 10
Source: Turn On or Off Language Bar and Input Indicator in Windows 10 | Tutorials
#60
Need Junit 4.11
@RunWith(Parameterized.class) public class ParametrizedTest { /** The Logger. */ private static final Logger LOGGER = LoggerFactory.getLogger(ParametrizedTest.class); /** XML Input Folder. */ private static File inputFolder = new File("target/classes/input"); /** XML Target Folder. */ private static File targetFolder = new File("target/test-classes/output"); private final File file; private final String param; /** * Default constructor. */ public ParametrizedTest(File file, String param) { this.file = file; this.param = param; } /** * Prepare env. for test run. * * @throws IOException */ public static void initClass() throws IOException { LOGGER.info("initClass()"); targetFolder.delete(); targetFolder.mkdirs(); } @Parameters(name = "{1}") public static Collection<Object[]> data() throws IOException { initClass(); return getAllFiles(); } /** * Test to run */ @Test public void test_1() { LOGGER.warn("------------------------------------------------------------------------"); LOGGER.warn("Processing : " + param); Assert.assertTrue(true); } /** * List files to process. * * @return List files to process. */ public static Collection<Object[]> getAllFiles() { LOGGER.info("Initialize collection"); List<Object[]> result = new ArrayList<Object[]>(); for (File template : targetFolder.listFiles()) { result.add(new Object[] { template, template.getName() }); } return result; } }
#1599
Sometime back I wrote a feature for docker to allow expanding Base device size on daemon restart. This feature has been included in Docker 1.10, so you can try it out now.Before we jump further into this article, I would like to point out that this feature is only available for devicemapper storage and does not apply to other storage drivers like overlay, btrfs, aufs, etc.
Source: Increasing the Base Device Size on Docker Daemon Restart — Project Atomic
#610
public class TestClass { @Rule public final StandardErrorStreamLog logErr = new StandardErrorStreamLog(); @Rule public final StandardOutputStreamLog log = new StandardOutputStreamLog(); @Test public void test1() { System.err.print("hello world"); assertEquals("hello world", logErr.getLog()); } }
Maven dependency :
<dependency> <groupId>com.github.stefanbirkner</groupId> <artifactId>system-rules</artifactId> <version>1.5.0</version> </dependency>