Package net.sf.parteg.base.testcasegraph.valuetypes

Examples of net.sf.parteg.base.testcasegraph.valuetypes.ValueType


      TCGOCLExpression in_oExpression) throws Exception {

    if (in_oExpression instanceof TCGOCLOperation) {
      TCGOCLOperation oCallExp = (TCGOCLOperation) in_oExpression;
      // TODO : hack, dass m_nMinValue f�r Polymorphie des Typparameters missbraucht wird -> �ndern!
      ValueType oValueOfExpression = m_oMinValue.createValueFromExpression(
          (TCGOCLExpression) oCallExp.getRight());
      if(oValueOfExpression != null) {
        setRange(oValueOfExpression, oCallExp.getOperationName());
      }
    }
View Full Code Here


      Map<TCGOCLAtom, TestCaseValidValue> in_colCurrentValueAssignment) throws Exception {

    if (in_oExpression instanceof TCGOCLOperation) {
      TCGOCLOperation oCallExp = (TCGOCLOperation) in_oExpression;
      // TODO : hack, dass m_nMinValue f�r Polymorphie des Typparameters missbraucht wird -> �ndern!
      ValueType oValueOfExpression = m_oMinValue.createValueFromExpression(
          (TCGOCLExpression) oCallExp.getRight(),
          in_colCurrentValueAssignment);
      setRange(oValueOfExpression, oCallExp.getOperationName());
    }
  }
View Full Code Here

      if(!(in_colCurrentValueTypeRanges.get(oAtom) instanceof OrderedValueTypeRange)) {
        return null;
      }
      OrderedValueTypeRange<OVT> oVTR = (OrderedValueTypeRange<OVT>)in_colCurrentValueTypeRanges.get(oAtom);
      if(oVTR == null) {
        ValueType oValueOfExpression = m_oMinValue.createValueFromExpression(
            in_oExpression, in_colCurrentValueAssignment);
        if(oValueOfExpression == null)
          return null;
        oVTR = (OrderedValueTypeRange<OVT>)ValueTypeRangeFactory.
          createValueTypeRangeForObject(in_oExpression);
View Full Code Here

    return !isEmpty();
  }

  @Override
  public ValueType getValidRandomValue() {
    ValueType oValue = null;
    if(!getAllowedValues().isEmpty())
    {
      // TODO Zufall implementieren!
      oValue = getAllowedValues().get(0);
    }
View Full Code Here

    }
    else {
      oValidExpression = (TCGOCLAtom)in_oExpression;
    }
   
    ValueType oValueOfExpression = getReferenceValue().createValueFromExpression(
        oValidExpression);
   
    if(in_oExpression instanceof TCGOCLOperation) // =, <, >, <=, >=, <>, not ?
      setRange(oValueOfExpression, ((TCGOCLOperation)in_oExpression).getOperationName());
    else // simple boolean values
View Full Code Here

    }
    else {
      oValidExpression = (TCGOCLAtom)in_oExpression;
    }
   
    ValueType oValueOfExpression = getReferenceValue().createValueFromExpression(
        oValidExpression, in_colCurrentValueAssignment);
   
    if(in_oExpression instanceof TCGOCLOperation) // =, <, >, <=, >=, <>, not ?
      setRange(oValueOfExpression, ((TCGOCLOperation)in_oExpression).getOperationName());
    else // simple boolean values
View Full Code Here

    return false;
  }
 
  @Override
  public ValueType getValidRandomValue() {
    ValueType oValue = null;
    if(!getAllowedValues().isEmpty())
    {
      oValue = getAllowedValues().get(0);
    }
    else
View Full Code Here

 
  public static void addRandomValuesForValidDomain(
      ArrayList<TestCaseValidValue> io_colValues,
      ValueTypeRange in_oValueRange)
  {
    ValueType oValue = in_oValueRange.getValidRandomValue();
    io_colValues.add(new TestCaseValidValue(oValue.toString()));   
  }
View Full Code Here

     
      // if only boundary values are of interest but there are no boundaries -> one random value
      if(m_bSelectValuesOnlyAtBoundaries &&
          (oVTRange.getMinValue().isMinimum() && oVTRange.isMinIncluded() &&
          (oVTRange.getMaxValue().isMaximum() && oVTRange.isMaxIncluded()))) {
        ValueType oRndValue = oVTRange.getValidRandomValue();       
        io_colValues.add(new TestCaseValidValue(oRndValue.toString()));       
      }
      // random values: only if random values are allowed or no boundary exists
      else if(!m_bSelectValuesOnlyAtBoundaries ||
          (oVTRange.getMinValue().isMinimum() && oVTRange.isMinIncluded() &&
              (oVTRange.getMaxValue().isMaximum() && oVTRange.isMaxIncluded()))) {
        for(int i = 0; i < Configuration.getNumberOfRandomElementsPerDomain(); ++i) {
          ValueType oRndValue = oVTRange.getValidRandomValue();       
          io_colValues.add(new TestCaseValidValue(oRndValue.toString()));
        }
      }
     
      if(!(oVTRange.getMinValue().isMinimum() && oVTRange.isMinIncluded() &&
          (oVTRange.getMaxValue().isMaximum() && oVTRange.isMaxIncluded()))) {
View Full Code Here

TOP

Related Classes of net.sf.parteg.base.testcasegraph.valuetypes.ValueType

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.