* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@Mock
AAFCon con;
-
+
@Mock
AbsUserCache<AAFPermission> cache;
-
+
@Mock
PropAccess propaccess;
-
+
@Before
public void setUp() {
initMocks(this);
String realm = authnObj.getRealm();
assertNull(realm);
}
-
+
@Test
public void testValidateFailure() {
AAFAuthnImplWithGetUserNull authnObj = new AAFAuthnImplWithGetUserNull(con, cache);
assertNull( e.getLocalizedMessage());
}
}
-
+
@Test
public void testValidate() {
AAFAuthnImpl authnObj = new AAFAuthnImpl(con);
e.printStackTrace();
}
}
-
+
@Test
public void testValidateRevalidate() {
AAFAuthnImpl authnObj = new AAFAuthnImpl(con);
e.printStackTrace();
}
}
-
+
@Test
public void testValidateValidUser() {
AAFAuthnImplWithGetUser authnObj = new AAFAuthnImplWithGetUser(con);
e.printStackTrace();
}
}
-
+
@Test
public void testValidateValidUserNull() {
AAFAuthnImplWithGetUserNull authnObj = new AAFAuthnImplWithGetUserNull(con);
this.access = propaccess;
// TODO Auto-generated constructor stub
}
-
+
AAFAuthnImpl(AAFCon con, AbsUserCache cache) {
super(con, cache);
this.access = propaccess;
// TODO Auto-generated constructor stub
}
-
-
+
+
}
-
+
class AAFAuthnImplWithGetUser extends AAFAuthn{
AAFAuthnImplWithGetUser(AAFCon con) {
super(con);
this.access = propaccess;
// TODO Auto-generated constructor stub
}
-
+
AAFAuthnImplWithGetUser(AAFCon con, AbsUserCache cache) {
super(con, cache);
this.access = propaccess;
// TODO Auto-generated constructor stub
}
-
+
@Override
protected User getUser(String user, byte[] cred) {
return new User<>("test",new byte[] {});
}
}
-
+
class AAFAuthnImplWithGetUserNull extends AAFAuthn{
AAFAuthnImplWithGetUserNull(AAFCon con) {
super(con);
this.access = propaccess;
// TODO Auto-generated constructor stub
}
-
+
AAFAuthnImplWithGetUserNull(AAFCon con, AbsUserCache cache) {
super(con, cache);
this.access = propaccess;
// TODO Auto-generated constructor stub
}
-
+
@Override
protected User getUser(String user, byte[] cred) {
User user1 = null;