1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.oauth;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 |
|
---|
6 | import javax.swing.ListCellRenderer;
|
---|
7 |
|
---|
8 | import org.junit.jupiter.api.extension.RegisterExtension;
|
---|
9 | import org.junit.jupiter.api.Test;
|
---|
10 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
11 |
|
---|
12 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit tests of {@link AuthorizationProcedureComboBox} class.
|
---|
16 | */
|
---|
17 | class AuthorizationProcedureComboBoxTest {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Setup tests
|
---|
21 | */
|
---|
22 | @RegisterExtension
|
---|
23 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
24 | public JOSMTestRules test = new JOSMTestRules();
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * Unit test of {@link AuthorizationProcedureComboBox}.
|
---|
28 | */
|
---|
29 | @Test
|
---|
30 | void testAuthorizationProcedureComboBox() {
|
---|
31 | ListCellRenderer<? super AuthorizationProcedure> r = new AuthorizationProcedureComboBox().getRenderer();
|
---|
32 | for (AuthorizationProcedure procedure : AuthorizationProcedure.values()) {
|
---|
33 | assertEquals(r, r.getListCellRendererComponent(null, procedure, 0, true, false));
|
---|
34 | assertEquals(r, r.getListCellRendererComponent(null, procedure, 0, false, false));
|
---|
35 | }
|
---|
36 | }
|
---|
37 | }
|
---|