Home | History | Annotate | Download | only in jgss
      1 /*
      2  *  Licensed to the Apache Software Foundation (ASF) under one or more
      3  *  contributor license agreements.  See the NOTICE file distributed with
      4  *  this work for additional information regarding copyright ownership.
      5  *  The ASF licenses this file to You under the Apache License, Version 2.0
      6  *  (the "License"); you may not use this file except in compliance with
      7  *  the License.  You may obtain a copy of the License at
      8  *
      9  *     http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  */
     17 
     18 /**
     19  * @author Alexander V. Esin
     20  */
     21 package org.ietf.jgss;
     22 
     23 import junit.framework.TestCase;
     24 
     25 /**
     26  * Tests GSSName interface
     27  */
     28 public class GSSNameTest extends TestCase {
     29 
     30     public void testNT_ANONYMOUS() throws Exception {
     31         Oid oid= new Oid("1.3.6.1.5.6.3");
     32         assertTrue(oid.equals(GSSName.NT_ANONYMOUS));
     33     }
     34 
     35     public void testNT_EXPORT_NAME() throws Exception {
     36         Oid oid= new Oid("1.3.6.1.5.6.4");
     37         assertTrue(oid.equals(GSSName.NT_EXPORT_NAME));
     38     }
     39 
     40     public void testNT_HOSTBASED_SERVICE() throws Exception {
     41         Oid oid= new Oid("1.3.6.1.5.6.2");
     42         assertTrue(oid.equals(GSSName.NT_HOSTBASED_SERVICE));
     43     }
     44 
     45     public void testNT_MACHINE_UID_NAME() throws Exception {
     46         Oid oid= new Oid("1.2.840.113554.1.2.1.2");
     47         assertTrue(oid.equals(GSSName.NT_MACHINE_UID_NAME));
     48     }
     49 
     50     public void testNT_STRING_UID_NAME() throws Exception {
     51         Oid oid= new Oid("1.2.840.113554.1.2.1.3");
     52         assertTrue(oid.equals(GSSName.NT_STRING_UID_NAME));
     53     }
     54 
     55     public void testNT_USER_NAME() throws Exception {
     56         Oid oid= new Oid("1.2.840.113554.1.2.1.1");
     57         assertTrue(oid.equals(GSSName.NT_USER_NAME));
     58     }
     59 }
     60