1   package com.melloware.jukes.util;
2   
3   
4   import com.melloware.jukes.AbstractTestCase;
5   
6   /**
7    * Test case to test TimeSpan class.
8    * <p>
9    * Copyright (c) 2006
10   * Melloware, Inc. <http://www.melloware.com>
11   * @author Emil A. Lefkof III <info@melloware.com>
12   * @version 4.0
13   */
14  public class TimeSpanTest extends AbstractTestCase {
15  
16  	public static void main(String[] args) {
17  		junit.textui.TestRunner.run(TimeSpanTest.class);
18  	}
19  
20  	/**
21  	 * Constructor for TimeSpanTest.
22  	 * @param arg0
23  	 */
24  	public TimeSpanTest(String arg0) {
25  		super(arg0);
26  	}
27  
28  	/*
29  	 * @see TestCase#setUp()
30  	 */
31  	protected void setUp() throws Exception {
32  		super.setUp();
33  	}
34  
35  	/*
36  	 * @see TestCase#tearDown()
37  	 */
38  	protected void tearDown() throws Exception {
39  		super.tearDown();
40  	}
41  
42  	/*
43  	 * Test method for 'com.melloware.jukes.util.TimeSpan.getDays()'
44  	 */
45  	public void testGetDays() {
46  		TimeSpan timespan = new TimeSpan(10000000000l);
47  		assertTrue(timespan.getDays() > 0);
48  
49  	}
50  
51  	/*
52  	 * Test method for 'com.melloware.jukes.util.TimeSpan.getHours()'
53  	 */
54  	public void testGetHours() {
55  		TimeSpan timespan = new TimeSpan(10000000000l);
56  		assertTrue(timespan.getHours() > 0);
57  	}
58  
59  	/*
60  	 * Test method for 'com.melloware.jukes.util.TimeSpan.getMilliseconds()'
61  	 */
62  	public void testGetMilliseconds() {
63  		TimeSpan timespan = new TimeSpan(10000000000l);
64  		assertTrue(timespan.getMilliseconds() > 0);
65  	}
66  
67  	/*
68  	 * Test method for 'com.melloware.jukes.util.TimeSpan.getMinutes()'
69  	 */
70  	public void testGetMinutes() {
71  		TimeSpan timespan = new TimeSpan(10000000000l);
72  		assertTrue(timespan.getMinutes() > 0);
73  	}
74  
75  	/*
76  	 * Test method for 'com.melloware.jukes.util.TimeSpan.getMusicDuration()'
77  	 */
78  	public void testGetMusicDuration() {
79  		TimeSpan timespan = new TimeSpan(10000000000l);
80  		assertTrue(timespan.getMusicDuration() != null);
81  	}
82  
83  	/*
84  	 * Test method for 'com.melloware.jukes.util.TimeSpan.getSeconds()'
85  	 */
86  	public void testGetSeconds() {
87  		TimeSpan timespan = new TimeSpan(10000000000l);
88  		assertTrue(timespan.getSeconds() > 0);
89  	}
90  
91  }