コード例 #1
0
  /** @tests javax.security.auth.SubjectDomainCombiner#getSubject() */
  @TestTargetNew(
      level = TestLevel.COMPLETE,
      notes = "Verifies that Subject associated with this SubjectDomainCombiner is returned",
      method = "getSubject",
      args = {})
  public void test_getSubject_01() {
    Subject s = new Subject();
    SubjectDomainCombiner c = new SubjectDomainCombiner(s);

    assertEquals(s, c.getSubject());
  }
コード例 #2
0
  /** @tests javax.security.auth.SubjectDomainCombiner#SubjectDomainCombiner(Subject subject) */
  @TestTargetNew(
      level = TestLevel.COMPLETE,
      notes = "",
      method = "SubjectDomainCombiner",
      args = {Subject.class})
  public void test_Constructor_01() {
    Subject s = new Subject();
    SubjectDomainCombiner c = new SubjectDomainCombiner(s);

    try {
      assertEquals(s, c.getSubject());
    } catch (SecurityException se) {

    }
  }