mitreid-connect
公開メンバ関数 | 全メンバ一覧
org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest クラス
org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest 連携図
Collaboration graph

公開メンバ関数

void testConfigurationPropertiesBean ()
 
void testCheckForHttpsIssuerHttpDefaultFlag ()
 
void testCheckForHttpsIssuerHttpFalseFlag ()
 
void testCheckForHttpsIssuerHttpTrueFlag ()
 
void testCheckForHttpsIssuerHttpsDefaultFlag ()
 
void testCheckForHttpsIssuerHttpsFalseFlag ()
 
void testCheckForHttpsIssuerHttpsTrueFlag ()
 
void testShortTopbarTitle ()
 

詳解

著者
jricher

関数詳解

◆ testCheckForHttpsIssuerHttpDefaultFlag()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testCheckForHttpsIssuerHttpDefaultFlag ( )
inline
60  {
61  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
62 
63  // issuer is http
64  // leave as default, which is unset/false
65  try {
66  bean.setIssuer("http://localhost:8080/openid-connect-server/");
67  bean.checkConfigConsistency();
68  } catch (BeanCreationException e) {
69  fail("Unexpected BeanCreationException for http issuer with default forceHttps, message:" + e.getMessage());
70  }
71  }

◆ testCheckForHttpsIssuerHttpFalseFlag()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testCheckForHttpsIssuerHttpFalseFlag ( )
inline
74  {
75  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
76  // issuer is http
77  // set to false
78  try {
79  bean.setIssuer("http://localhost:8080/openid-connect-server/");
80  bean.setForceHttps(false);
81  bean.checkConfigConsistency();
82  } catch (BeanCreationException e) {
83  fail("Unexpected BeanCreationException for http issuer with forceHttps=false, message:" + e.getMessage());
84  }
85  }

◆ testCheckForHttpsIssuerHttpsDefaultFlag()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testCheckForHttpsIssuerHttpsDefaultFlag ( )
inline
98  {
99  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
100  // issuer is https
101  // leave as default, which is unset/false
102  try {
103  bean.setIssuer("https://localhost:8080/openid-connect-server/");
104  bean.checkConfigConsistency();
105  } catch (BeanCreationException e) {
106  fail("Unexpected BeanCreationException for https issuer with default forceHttps, message:" + e.getMessage());
107  }
108  }

◆ testCheckForHttpsIssuerHttpsFalseFlag()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testCheckForHttpsIssuerHttpsFalseFlag ( )
inline
111  {
112  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
113  // issuer is https
114  // set to false
115  try {
116  bean.setIssuer("https://localhost:8080/openid-connect-server/");
117  bean.setForceHttps(false);
118  bean.checkConfigConsistency();
119  } catch (BeanCreationException e) {
120  fail("Unexpected BeanCreationException for https issuer with forceHttps=false, message:" + e.getMessage());
121  }
122  }

◆ testCheckForHttpsIssuerHttpsTrueFlag()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testCheckForHttpsIssuerHttpsTrueFlag ( )
inline
125  {
126  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
127  // issuer is https
128  // set to true
129  try {
130  bean.setIssuer("https://localhost:8080/openid-connect-server/");
131  bean.setForceHttps(true);
132  bean.checkConfigConsistency();
133  } catch (BeanCreationException e) {
134  fail("Unexpected BeanCreationException for https issuer with forceHttps=true, message:" + e.getMessage());
135  }
136 
137  }

◆ testCheckForHttpsIssuerHttpTrueFlag()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testCheckForHttpsIssuerHttpTrueFlag ( )
inline
88  {
89  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
90  // issuer is http
91  // set to true
92  bean.setIssuer("http://localhost:8080/openid-connect-server/");
93  bean.setForceHttps(true);
94  bean.checkConfigConsistency();
95  }

◆ testConfigurationPropertiesBean()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testConfigurationPropertiesBean ( )
inline

Test getters and setters for configuration object.

39  {
40 
41  // make sure the values that go in come back out unchanged
42  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
43 
44  String iss = "http://localhost:8080/openid-connect-server/";
45  String title = "OpenID Connect Server";
46  String logoUrl = "/images/logo.png";
47 
48  bean.setIssuer(iss);
49  bean.setTopbarTitle(title);
50  bean.setLogoImageUrl(logoUrl);
51  bean.setForceHttps(true);
52 
53  assertEquals(iss, bean.getIssuer());
54  assertEquals(title, bean.getTopbarTitle());
55  assertEquals(logoUrl, bean.getLogoImageUrl());
56  assertEquals(true, bean.isForceHttps());
57  }

◆ testShortTopbarTitle()

void org.mitre.openid.connect.config.ConfigurationPropertiesBeanTest.testShortTopbarTitle ( )
inline
140  {
141  ConfigurationPropertiesBean bean = new ConfigurationPropertiesBean();
142  bean.setTopbarTitle("LONG");
143  assertEquals("LONG", bean.getShortTopbarTitle());
144  bean.setShortTopbarTitle("SHORT");
145  assertEquals("SHORT", bean.getShortTopbarTitle());
146  }

このクラス詳解は次のファイルから抽出されました: