Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Operation


   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_Operation(Operation newBase_Operation) {
    Operation oldBase_Operation = base_Operation;
    base_Operation = newBase_Operation;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.TEST_CASE__BASE_OPERATION, oldBase_Operation, base_Operation));
  }
View Full Code Here


    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
    MethodDeclaration md = ast.newMethodDeclaration();
    md.setName(ast.newSimpleName("calculateAge"));

    Operation operation = mock(Operation.class,
        Answers.RETURNS_DEEP_STUBS.get());
    EList<Parameter> params = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Iterator<Parameter> paramIterator = mock(Iterator.class);
    Parameter parameter = mock(Parameter.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Type type = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());

    Map<String, String> types = new HashMap<String, String>();
    types.put("umlTypeName", "Collection<de::test::Company>");
    types.put("umlQualifiedTypeName",
        "Data::datatype::Collection<de::test::Company>");

    when(operation.getOwnedParameters()).thenReturn(params);
    when(params.iterator()).thenReturn(paramIterator);
    when(paramIterator.hasNext()).thenReturn(true, false);
    when(paramIterator.next()).thenReturn(parameter);
    when(parameter.getDirection()).thenReturn(
        ParameterDirectionKind.get(ParameterDirectionKind.IN));
View Full Code Here

    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));

    EList<Operation> operations = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Operation operation = mock(Operation.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Type operationType = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());
    Iterator<Operation> iteratorOperation = mock(Iterator.class);
    EList<Type> raisedExceptions = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Iterator<Type> iteratorException = mock(Iterator.class);
    Type exceptionType = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());

    when(clazz.getOperations()).thenReturn(operations);
    when(operations.iterator()).thenReturn(iteratorOperation);
    when(iteratorOperation.hasNext()).thenReturn(true, false);
    when(iteratorOperation.next()).thenReturn(operation);
    when(operation.getName()).thenReturn("calculateMe");
    when(operation.getType()).thenReturn(operationType);
    when(operation.getRaisedExceptions()).thenReturn(raisedExceptions);
    when(raisedExceptions.iterator()).thenReturn(iteratorException);
    when(iteratorException.hasNext()).thenReturn(true, false);
    when(iteratorException.next()).thenReturn(exceptionType);

    when(exceptionType.getQualifiedName()).thenReturn(
View Full Code Here

    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
    MethodDeclaration md = ast.newMethodDeclaration();
    md.setName(ast.newSimpleName("calculateAge"));

    Operation operation = mock(Operation.class,
        Answers.RETURNS_DEEP_STUBS.get());
    EList<Comment> comments = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Iterator<Comment> commentIterator = mock(Iterator.class);
    Comment comment = mock(Comment.class, Answers.RETURNS_DEEP_STUBS.get());

    when(operation.getOwnedComments()).thenReturn(comments);
    when(comments.iterator()).thenReturn(commentIterator);
    when(commentIterator.hasNext()).thenReturn(true, false);
    when(commentIterator.next()).thenReturn(comment);
    when(comment.getBody()).thenReturn(
        "Comment...\nTest\n@author: Lofi Dewanto");
View Full Code Here

    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
    MethodDeclaration md = ast.newMethodDeclaration();
    md.setName(ast.newSimpleName("calculateAge"));

    Operation operation = mock(Operation.class,
        Answers.RETURNS_DEEP_STUBS.get());
    EList<TemplateParameter> templateParams = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Iterator<TemplateParameter> templateParamIterator = mock(Iterator.class);
    TemplateSignature templateSignature = mock(TemplateSignature.class,
        Answers.RETURNS_DEEP_STUBS.get());
    TemplateParameter templateParameter = mock(TemplateParameter.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Classifier classifier = mock(Classifier.class);

    when(operation.getOwnedTemplateSignature()).thenReturn(
        templateSignature);
    when(templateSignature.getParameters()).thenReturn(templateParams);
    when(templateParams.iterator()).thenReturn(templateParamIterator);
    when(templateParamIterator.hasNext()).thenReturn(true, false);
    when(templateParamIterator.next()).thenReturn(templateParameter);
View Full Code Here

    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
    MethodDeclaration md = ast.newMethodDeclaration();
    md.setName(ast.newSimpleName("calculateAge"));

    Operation operation = mock(Operation.class,
        Answers.RETURNS_DEEP_STUBS.get());
    EList<TemplateParameter> templateParams = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Iterator<TemplateParameter> templateParamIterator = mock(Iterator.class);
    TemplateSignature templateSignature = mock(TemplateSignature.class,
        Answers.RETURNS_DEEP_STUBS.get());
    TemplateParameter templateParameter = mock(TemplateParameter.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Classifier classifier = mock(Classifier.class);

    when(operation.getOwnedTemplateSignature()).thenReturn(
        templateSignature);
    when(templateSignature.getParameters()).thenReturn(templateParams);
    when(templateParams.iterator()).thenReturn(templateParamIterator);
    when(templateParamIterator.hasNext()).thenReturn(true, false);
    when(templateParamIterator.next()).thenReturn(templateParameter);
View Full Code Here

    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
    MethodDeclaration md = ast.newMethodDeclaration();
    md.setName(ast.newSimpleName("calculateAge"));

    Operation operation = mock(Operation.class,
        Answers.RETURNS_DEEP_STUBS.get());
    EList<Parameter> parameters = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Iterator<Parameter> paramIterator = mock(Iterator.class);
    Parameter parameter = mock(Parameter.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Type type = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());

    when(operation.getOwnedParameters()).thenReturn(parameters);
    when(parameters.iterator()).thenReturn(paramIterator);
    when(paramIterator.hasNext()).thenReturn(true, false);
    when(paramIterator.next()).thenReturn(parameter);
    when(parameter.getDirection()).thenReturn(
        ParameterDirectionKind.IN_LITERAL);
View Full Code Here

    td.modifiers().add(modifier);
    td.setName(ast.newSimpleName("Company"));
    MethodDeclaration md = ast.newMethodDeclaration();
    md.setName(ast.newSimpleName("calculateAge"));

    Operation operation = mock(Operation.class,
        Answers.RETURNS_DEEP_STUBS.get());
    EList<Parameter> parameters = mock(EList.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Iterator<Parameter> paramIterator = mock(Iterator.class);
    Parameter parameter = mock(Parameter.class,
        Answers.RETURNS_DEEP_STUBS.get());
    Type type = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());

    when(operation.getOwnedParameters()).thenReturn(parameters);
    when(parameters.iterator()).thenReturn(paramIterator);
    when(paramIterator.hasNext()).thenReturn(true, false);
    when(paramIterator.next()).thenReturn(parameter);
    when(parameter.getDirection()).thenReturn(
        ParameterDirectionKind.IN_LITERAL);
View Full Code Here

      parentProfile = Activator.getSysMLProfile();
    } else if (profileQualifiedName.startsWith("Standard")) {
      parentProfile = Activator.getStandardProfile();
    }

    Package profilePackage = parentProfile;

    final String[] profiles = profileQualifiedName.split(":{2}");
    // search the profile in the package hierarchy
    for (int index = 1; index < profiles.length - 1; index++) {
      profilePackage = profilePackage.getNestedPackage(profiles[index]);
    }

    Profile profile = (Profile)profilePackage;

    if (profileQualifiedName.startsWith("SysML")) {
      profile = (Profile)profilePackage.getNestedPackage(profiles[profiles.length - 1]);
    }

    if (profile == null) {
      final String message = "Can't apply the profile " + profileQualifiedName + " on "
          + p.getQualifiedName();
View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_Property(Property newBase_Property) {
    Property oldBase_Property = base_Property;
    base_Property = newBase_Property;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.Operation

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.