protected void setUp() throws Exception { super.setUp(); PermissionContextFactory ctxFactory = ComponentAccessor.getPermissionContextFactory(); DefaultSchemeFactory schemeFactory = new DefaultSchemeFactory(); OfBizDelegator ofBizDelegator = new DefaultOfBizDelegator(CoreFactory.getGenericDelegator()); AssociationManager associationManager = CoreFactory.getAssociationManager(); ManagerFactory.addService( IssueSecuritySchemeManager.class, new IssueSecuritySchemeManagerImpl( new DefaultProjectManager(), new PermissionTypeManager(), ctxFactory, schemeFactory, null, associationManager, ofBizDelegator, null)); issueSchemeManager = ManagerFactory.getIssueSecuritySchemeManager(); project = UtilsForTests.getTestEntity("Project", EasyMap.build("id", new Long(2), "lead", "paul")); project2 = UtilsForTests.getTestEntity("Project", new HashMap()); }
protected void setUp() throws Exception { super.setUp(); CoreTransactionUtil.setUseTransactions(false); setUpMocks(); ctrlFieldManager.expectAndReturn(mockFieldManager.isOrderableField("customfield_1"), true); ctrlFieldManager.expectAndReturn(mockFieldManager.isOrderableField("customfield_2"), false); ctrlFieldManager.expectAndReturn(mockFieldManager.isOrderableField("customfield_3"), false); replayMocks(); UtilsForTests.getTestEntity( "FieldLayoutItem", EasyMap.build("id", new Long(1001), "fieldidentifier", "customfield_1")); UtilsForTests.getTestEntity( "FieldLayoutItem", EasyMap.build("id", new Long(1002), "fieldidentifier", "customfield_2")); UtilsForTests.getTestEntity( "FieldLayoutItem", EasyMap.build("id", new Long(1003), "fieldidentifier", "customfield_3")); flCheck = new FieldLayoutCheck(ofBizDelegator, 1); flCheck.setFieldManager(mockFieldManager); }
protected void setUp() throws Exception { super.setUp(); mockFieldLayoutManager = new Mock(FieldLayoutManager.class); mockFieldLayoutManager.setStrict(true); efls = new EditFieldLayoutScheme((FieldLayoutManager) mockFieldLayoutManager.proxy()); }