1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.mybatis.jpetstore.web.actions;
17
18 import static org.assertj.core.api.Assertions.assertThat;
19
20 import org.junit.jupiter.api.Test;
21 import org.mybatis.jpetstore.domain.Account;
22
23 class AccountActionBeanTest {
24
25
26 @Test
27 void getMyListOutputNull() {
28
29
30 final AccountActionBean accountActionBean = new AccountActionBean();
31
32
33 assertThat(accountActionBean.getMyList()).isNull();
34
35 }
36
37
38 @Test
39 void constructorOutputNotNull() {
40
41
42 final AccountActionBean actual = new AccountActionBean();
43
44
45 assertThat(actual).isNotNull();
46 assertThat(actual.getContext()).isNull();
47
48 }
49
50
51 @Test
52 void getPasswordOutputNull() {
53
54
55 final AccountActionBean accountActionBean = new AccountActionBean();
56
57
58 assertThat(accountActionBean.getPassword()).isNull();
59
60 }
61
62
63 @Test
64 void isAuthenticatedOutputFalse() {
65
66
67 final AccountActionBean accountActionBean = new AccountActionBean();
68
69
70 assertThat(accountActionBean.isAuthenticated()).isFalse();
71
72 }
73
74
75 @Test
76 void getUsernameOutputNull() {
77
78
79 final AccountActionBean accountActionBean = new AccountActionBean();
80
81
82 assertThat(accountActionBean.getUsername()).isNull();
83
84 }
85
86
87 @Test
88 void getAccountOutputNotNull() {
89
90
91 final AccountActionBean accountActionBean = new AccountActionBean();
92
93
94 final Account actual = accountActionBean.getAccount();
95
96
97 assertThat(actual).isNotNull();
98 assertThat(actual.getAddress2()).isNull();
99 assertThat(actual.getState()).isNull();
100 assertThat(actual.getFirstName()).isNull();
101 assertThat(actual.getPassword()).isNull();
102 assertThat(actual.getLanguagePreference()).isNull();
103 assertThat(actual.getFavouriteCategoryId()).isNull();
104 assertThat(actual.getCountry()).isNull();
105 assertThat(actual.getPhone()).isNull();
106 assertThat(actual.getUsername()).isNull();
107 assertThat(actual.getLastName()).isNull();
108 assertThat(actual.getAddress1()).isNull();
109 assertThat(actual.getEmail()).isNull();
110 assertThat(actual.getStatus()).isNull();
111 assertThat(actual.getBannerName()).isNull();
112 assertThat(actual.getZip()).isNull();
113 assertThat(actual.getCity()).isNull();
114
115 }
116 }