alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code


package data.run;

import junit.framework.*;

public class PropertiesTest extends TestCase {
    
    public PropertiesTest(java.lang.String testName) {
        super(testName);
    }
    
    /** Test of some_method_to_test method, of class data.run.Main. */
    public void testProperties() {
        System.out.println("Properties test:");
        System.out.println("Testing Properties 1:");
        System.out.println(System.getProperty ("testingproperty1", ""));
        System.out.println("Testing Properties 2:");
        System.out.println(System.getProperty ("a.b.c.d", ""));
        System.out.println("Testing Non-existing Properties 1:");
        System.out.println(System.getProperty ("nonexisting.property", ""));
    }
    
    public static Test suite() {
        TestSuite suite = new TestSuite(PropertiesTest.class);
        
        return suite;
    }
    
    public static void main(java.lang.String[] args) {
        junit.textui.TestRunner.run(suite());
    }
    
    // Add test methods here, they have to start with 'test' name.
    // for example:
    // public void testHello() {}
    
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.