I am trying to execute the below code. My IDE tells me
USER_ROLE_EMPLOYEE cannot be resolved to a variable
Here is my code:
public class TestUserHelper {
@Before
public void setUp() throws Exception {
String USER_ROLE_EMPLOYEE="Service Desk";
String USER_ROLE_MANAGER="Store Manager";
}
@Test
public void testIsUserRoleValidEmployee() {
Assert.assertTrue(UserValidator.validateSupervisor(USER_ROLE_EMPLOYEE));
}
@Test
public void testIsUserRoleValidSupervisor() {
Assert.assertTrue(UserValidator.validateSupervisor(USER_ROLE_MANAGER));
}
}
I am getting an error saying USER_ROLE_EMPLOYEE
, USER_ROLE_MANAGER
cannot be resolved to a variable.
What am I doing wrong?