Package com.google.testing.testify.risk.frontend.model

Examples of com.google.testing.testify.risk.frontend.model.Attribute


    dataService.getSignoffsByType(EasyMock.eq(42L), EasyMock.eq(AccElementType.ATTRIBUTE),
        EasyMock.isA(AsyncCallback.class));
    EasyMockUtils.setLastAsyncCallbackSuccessWithResult(signoffs);
    mockProjService.getLabels(EasyMock.eq(42L), EasyMock.isA(AsyncCallback.class));
    EasyMockUtils.setLastAsyncCallbackSuccessWithResult(labels);
    Attribute att = new Attribute();
    att.setParentProjectId(42L);
    attributes.add(att);

    mockView.setPresenter((AttributesView.Presenter) EasyMock.anyObject());
    mockView.setProjectAttributes(attributes);
    mockView.setSignoffs(signoffs);
View Full Code Here


    SimpleEventBus mockEventBus = EasyMock.createMock(SimpleEventBus.class);
    UserRpcAsync securityService = EasyMock.createMock(UserRpcAsync.class);
    DataRpcAsync dataService = EasyMock.createMock(DataRpcAsync.class);

    ArrayList<Attribute> attributes = new ArrayList<Attribute>();
    Attribute att = new Attribute();
    att.setAttributeId(42L);
    attributes.add(att);
    ArrayList<Signoff> signoffs = new ArrayList<Signoff>();
    Collection<String> labels = Lists.newArrayList();

    Project parentProject = new Project();
View Full Code Here

    DataRpcAsync dataService = EasyMock.createMock(DataRpcAsync.class);
    ArrayList<Signoff> signoffs = new ArrayList<Signoff>();
    Collection<String> labels = Lists.newArrayList();

    ArrayList<Attribute> attributes = new ArrayList<Attribute>();
    Attribute att = new Attribute();
    att.setParentProjectId(42L);
    attributes.add(att);

    Project parentProject = new Project();
    parentProject.setProjectId(42L);

    securityService.hasEditAccess(EasyMock.eq(42L), EasyMock.isA(AsyncCallback.class));
    EasyMockUtils.setLastAsyncCallbackSuccessWithResult(false);
    mockProjService.getProjectAttributes(EasyMock.eq(42L), EasyMock.isA(AsyncCallback.class));
    EasyMockUtils.setLastAsyncCallbackSuccessWithResult(attributes);
    dataService.getSignoffsByType(EasyMock.eq(42L), EasyMock.eq(AccElementType.ATTRIBUTE),
        EasyMock.isA(AsyncCallback.class));
    EasyMockUtils.setLastAsyncCallbackSuccessWithResult(signoffs);
    mockProjService.getLabels(EasyMock.eq(42L), EasyMock.isA(AsyncCallback.class));
    EasyMockUtils.setLastAsyncCallbackSuccessWithResult(labels);

    AttributesPresenter testPresenter = new AttributesPresenter(
      parentProject, mockProjService, securityService, dataService, mockView,
      mockEventBus);

    EasyMock.reset(mockEventBus, mockProjService, securityService, dataService);

    Attribute newAttribute = new Attribute();
    newAttribute.setParentProjectId(42L);
    mockProjService.createAttribute(EasyMock.eq(newAttribute), EasyMock.isA(AsyncCallback.class));
    EasyMockUtils.setLastAsyncCallbackSuccessWithResult(1L);

    mockEventBus.fireEvent(EasyMock.isA(ProjectElementAddedEvent.class));
View Full Code Here

public class StaticRiskProviderTest extends TestCase {
  public void testWhenNoCapabilities() {
    StaticRiskProvider testProvider = new StaticRiskProvider();
    testProvider.initialize(new ArrayList<CapabilityIntersectionData>());

    Attribute testAttribute = new Attribute();
    testAttribute.setParentProjectId(42L);
    testAttribute.setAttributeId(1L);
    Component testComponent = new Component(42L);
    testComponent.setComponentId(1L);

    CapabilityIntersectionData cell =
        new CapabilityIntersectionData(testAttribute, testComponent, new ArrayList<Capability>());
View Full Code Here

TOP

Related Classes of com.google.testing.testify.risk.frontend.model.Attribute

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.