Also showing traditional API use
authorJaroslav Tulach <jtulach@netbeans.org>
Mon, 25 May 2009 18:35:11 +0200
changeset 331b5228ed41a43
parent 330 be82436a7a8b
child 332 139aacf8152d
Also showing traditional API use
samples/privilegedcreator/test/api/MutexTest.java
     1.1 --- a/samples/privilegedcreator/test/api/MutexTest.java	Mon May 25 18:27:02 2009 +0200
     1.2 +++ b/samples/privilegedcreator/test/api/MutexTest.java	Mon May 25 18:35:11 2009 +0200
     1.3 @@ -38,6 +38,9 @@
     1.4       */
     1.5      @Test
     1.6      public void readAccess() {
     1.7 +        Mutex instance = new Mutex();
     1.8 +
     1.9 +        // BEGIN: mutex.use
    1.10          class R implements Runnable {
    1.11              int cnt;
    1.12              
    1.13 @@ -46,9 +49,9 @@
    1.14              }
    1.15          }
    1.16          R r = new R();
    1.17 -        Mutex instance = new Mutex();
    1.18          instance.readAccess(r);
    1.19          assertEquals("One call to runnable", 1, r.cnt);
    1.20 +        // END: mutex.use
    1.21      }
    1.22      
    1.23      @Test