~ubuntu-branches/ubuntu/precise/surefire/precise

« back to all changes in this revision

Viewing changes to surefire-integration-tests/src/test/resources/surefire-34-securityManager/src/test/java/junit4/SecurityManagerTest.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2011-10-10 20:42:16 UTC
  • mfrom: (2.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20111010204216-cemva69wkagf4fay
Tags: 2.10-1
* Team upload.
* New upstream release.
* Refresh and remove unneccesary patches.
* Add Build-Depends on libsurefire-java and
  libmaven-common-artifact-filters-java.
* Drop outdated Maven artifact surefire-junit.
* Provide new Maven artifacts: surefire-junit3, maven-surefire-common,
  common-junit3, common-junit4, surefire-junit47 and surefire-testng-utils.
* Fix clean target to allow "two in a row" builds.
* Update Vcs-Browser field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package junit4;
 
2
 
 
3
import java.io.File;
 
4
 
 
5
import junit.framework.TestCase;
 
6
 
 
7
 
 
8
public class SecurityManagerTest
 
9
    extends TestCase
 
10
{
 
11
 
 
12
    private boolean setUpCalled = false;
 
13
 
 
14
    private static boolean tearDownCalled = false;
 
15
    
 
16
    public void setUp()
 
17
    {
 
18
        setUpCalled = true;
 
19
        tearDownCalled = false;
 
20
        System.out.println( "Called setUp" );
 
21
    }
 
22
 
 
23
    public void tearDown()
 
24
    {
 
25
        setUpCalled = false;
 
26
        tearDownCalled = true;
 
27
        System.out.println( "Called tearDown" );
 
28
    }
 
29
 
 
30
    public void testSetUp()
 
31
    {
 
32
        assertTrue( "setUp was not called", setUpCalled );
 
33
    }
 
34
  
 
35
    public void testWillFailWhenAccessingCurrentDirectory()
 
36
    {
 
37
        File file = new File( "." );
 
38
        file.isDirectory();
 
39
    }
 
40
 
 
41
}