| ApplicationRetriever | Line # 6 | 0 | 0 | - |
-1.0
|
| ApplicationRetriever.RetrievalException | Line # 21 | 2 | 2 | 100% |
1.0
|
| ApplicationRetriever.ApplicationNotFoundException | Line # 37 | 2 | 2 | 100% |
1.0
|
| ApplicationRetriever.InvalidApplicationDetailsException | Line # 53 | 1 | 1 | 100% |
1.0
|
| ApplicationRetriever.RemoteSystemNotFoundException | Line # 64 | 1 | 1 | 100% |
1.0
|
| (5) | |||
| Result | |||
|
0.33333334
|
com.atlassian.security.auth.trustedapps.TestBouncyCastleEncryptionProvider.testGetApplicationCertificateNotFoundAtAll
com.atlassian.security.auth.trustedapps.TestBouncyCastleEncryptionProvider.testGetApplicationCertificateNotFoundAtAll
|
1 PASS | |
|
0.33333334
|
com.atlassian.security.auth.trustedapps.TestListApplicationRetriever.testGetApplicationListTooSmall
com.atlassian.security.auth.trustedapps.TestListApplicationRetriever.testGetApplicationListTooSmall
|
1 PASS | |
|
0.33333334
|
com.atlassian.security.auth.trustedapps.TestBouncyCastleEncryptionProvider.testGetApplicationCertificateReturnsEmpty
com.atlassian.security.auth.trustedapps.TestBouncyCastleEncryptionProvider.testGetApplicationCertificateReturnsEmpty
|
1 PASS | |
|
0.33333334
|
com.atlassian.security.auth.trustedapps.TestReaderApplicationRetriever.testProtocolVersion1BadMagic
com.atlassian.security.auth.trustedapps.TestReaderApplicationRetriever.testProtocolVersion1BadMagic
|
1 PASS | |
|
0.33333334
|
com.atlassian.security.auth.trustedapps.TestBouncyCastleEncryptionProvider.testGetApplicationCertificateMalformedUrl
com.atlassian.security.auth.trustedapps.TestBouncyCastleEncryptionProvider.testGetApplicationCertificateMalformedUrl
|
1 PASS | |
| 1 | package com.atlassian.security.auth.trustedapps; | |
| 2 | ||
| 3 | /** | |
| 4 | * Responsible for getting Application details from a client | |
| 5 | */ | |
| 6 | public interface ApplicationRetriever | |
| 7 | { | |
| 8 | /** | |
| 9 | * Reads an Application from the data supplied by the Reader. | |
| 10 | * | |
| 11 | * @throws InvalidCertificateException | |
| 12 | * if there are problems getting the cert | |
| 13 | */ | |
| 14 | Application getApplication() throws RetrievalException; | |
| 15 | ||
| 16 | // --------------------------------------------------------------------------------------------------- inner classes | |
| 17 | ||
| 18 | /** | |
| 19 | * Used if the Application cannot be retrieved. | |
| 20 | */ | |
| 21 | public static abstract class RetrievalException extends Exception | |
| 22 | { | |
| 23 | 2 |
RetrievalException(String message) |
| 24 | { | |
| 25 | 2 | super(message); |
| 26 | } | |
| 27 | ||
| 28 | 3 |
RetrievalException(Exception cause) |
| 29 | { | |
| 30 | 3 | super(cause); |
| 31 | } | |
| 32 | } | |
| 33 | ||
| 34 | /** | |
| 35 | * An application certificate was not found at a web site. | |
| 36 | */ | |
| 37 | public static class ApplicationNotFoundException extends RetrievalException | |
| 38 | { | |
| 39 | 2 |
ApplicationNotFoundException(String message) |
| 40 | { | |
| 41 | 2 | super(message); |
| 42 | } | |
| 43 | ||
| 44 | 1 |
ApplicationNotFoundException(Exception cause) |
| 45 | { | |
| 46 | 1 | super(cause); |
| 47 | } | |
| 48 | } | |
| 49 | ||
| 50 | /** | |
| 51 | * An application certificate was found but is not valid. | |
| 52 | */ | |
| 53 | public static class InvalidApplicationDetailsException extends RetrievalException | |
| 54 | { | |
| 55 | 1 |
InvalidApplicationDetailsException(Exception cause) |
| 56 | { | |
| 57 | 1 | super(cause); |
| 58 | } | |
| 59 | } | |
| 60 | ||
| 61 | /** | |
| 62 | * Remote website counld not be contacted at the address provided. | |
| 63 | */ | |
| 64 | public static class RemoteSystemNotFoundException extends RetrievalException | |
| 65 | { | |
| 66 | 1 |
RemoteSystemNotFoundException(Exception cause) |
| 67 | { | |
| 68 | 1 | super(cause); |
| 69 | } | |
| 70 | } | |
| 71 | } | |
|
||||||||||