Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.UserType


  private ManagerRepository managerRepository;

  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    final UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    ConstructionTypeManager constructionTypeManager = (ConstructionTypeManager) ModelUtil
        .getBean(ConstructionTypeManager.MANAGER_NAME);
    when(managerRepository.getConstructionTypeManager()).thenReturn(
        constructionTypeManager);
View Full Code Here


    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    applicationUser.setUserName("username");
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    final UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
    WindowAccess windowAccess = new WindowAccess();
    windowAccess.setWindowName("Produksjonsenhet");
    userTypeAccess.setWindowAccess(windowAccess);
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
   
    final DeviationOverviewViewFactory deviationOverviewViewFactory = new DeviationOverviewViewFactory() {

      public DeviationOverviewView create(
View Full Code Here

    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    ApplicationUser applicationUser = new ApplicationUser();
    applicationUser.setUserName("username");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    preventiveActionManager = (PreventiveActionManager) ModelUtil
        .getBean("preventiveActionManager");
    when(managerRepository.getPreventiveActionManager()).thenReturn(
        preventiveActionManager);
View Full Code Here

    UserUtil.setUserTypeManagerForTest(userTypeManager);
    Util.setJobFunctionManager(jobFunctionManager);
    ApplicationUserUtil.setApplicationUserManager(applicationUserManager);
    when(managerRepository.getDeviationStatusManager()).thenReturn(
        deviationStatusManager);
    UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
    WindowAccess windowAccess = new WindowAccess();
    windowAccess.setWindowName("Garasjetype");
    userTypeAccess.setWindowAccess(windowAccess);
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);

    when(login.getUserType()).thenReturn(userType);
    ApplicationUser applicationUser = new ApplicationUser();
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);
View Full Code Here

  private ManagerRepository managerRepository;

  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);

    articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean("articleTypeManager");
    when(managerRepository.getArticleTypeManager()).thenReturn(
View Full Code Here

    MockitoAnnotations.initMocks(this);
    AttributeManager attributeManager = (AttributeManager) ModelUtil
        .getBean(AttributeManager.MANAGER_NAME);
    when(managerRepository.getAttributeManager()).thenReturn(
        attributeManager);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);

    AttributeViewHandler viewHandler = new AttributeViewHandler(login,
        managerRepository);
    final AttributeView view = new AttributeView(viewHandler, false);
View Full Code Here

  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    Util.setArticleTypeManager(articleTypeManager);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    List<ProductionUnit> productionUnitList = Lists.newArrayList();
    ProductionUnit productionUnit = new ProductionUnit();
    productionUnit.setProductionUnitName("productionUnitName");
    productionUnitList.add(productionUnit);
View Full Code Here

   *
   * @param window
   * @param presentationModel
   */
  void addUserType(WindowInterface window, PresentationModel presentationModel) {
    UserType selectedUserType = (UserType) JOptionPane.showInputDialog(
        window.getComponent(), "Velg profil", "Legg til profil",
        JOptionPane.INFORMATION_MESSAGE, null, userTypes.toArray(),
        null);
    if (selectedUserType != null && presentationModel != null) {
      UserRole userRole = new UserRole(null, selectedUserType,
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.UserType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.