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

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


    return false;
  }

  @Override
  public ValueType getValidRandomValue() {
    OrderedValueType oMinVT = m_oMinValue;
    if(!isMinIncluded())
      oMinVT = oMinVT.getUpperValueMinDistance();
    OrderedValueType oMaxVT = m_oMaxValue;
    if(!isMaxIncluded())
      oMaxVT = oMaxVT.getLowerValueMinDistance();
    return m_oMinValue.getRandomValueBetween(oMinVT, oMaxVT);
  }
View Full Code Here


        if(!(in_colCurrentValueTypeRanges.get(oAtom) instanceof OrderedValueTypeRange)) {
          return null;
        }
        OrderedValueTypeRange oVTR =
          (OrderedValueTypeRange)in_colCurrentValueTypeRanges.get(oAtom);
        OrderedValueType oMaxVT = oVTR.getMaxValue();
        if(!oVTR.isMaxIncluded())
          oMaxVT = oMaxVT.getLowerValueMinDistance();
        OrderedValueType oMinVT = oVTR.getMinValue();
        if(!oVTR.isMinIncluded())
          oMinVT = oMinVT.getUpperValueMinDistance();

        colAtomToValueRanges.put(oAtom, new Pair<ValueType, ValueType>(
            oMinVT, oMaxVT));
      }
      Pair<ValueType, ValueType> oValueTypePair =
        m_oMinValue.createValueFromExpression(
            oOperation.getRight(), in_colCurrentValueAssignment,
            colAtomToValueRanges);
      if(oValueTypePair != null) {
        OrderedValueType oFirstValue = (OrderedValueType)oValueTypePair.getFirst();
        OrderedValueType oSecondValue = (OrderedValueType)oValueTypePair.getSecond();
        OrderedValueTypeRange<OVT> oVTR = new OrderedValueTypeRange<OVT>(
            oFirstValue, true, oSecondValue, true);
 
        return oVTR;
      }
View Full Code Here

    return false;   
  }

  @Override
  public void setRange(String in_sSelectedTestValue) {
    OrderedValueType oMinOVT = getMinValue();
    oMinOVT.setValue(in_sSelectedTestValue);
    OrderedValueType oMaxOVT = getMaxValue();
    oMaxOVT.setValue(in_sSelectedTestValue);
    setMinValue(oMinOVT);
    setMinIncluded(true);
    setMaxValue(oMaxOVT);
    setMaxIncluded(true);
  }
View Full Code Here

              new TestCaseValidValue(
                oVTRange.getMinValue().toString()));
          }
          else
          {
            OrderedValueType oTmp = oVTRange.getMinValue().getUpperValueMinDistance();
            io_colValues.add(new TestCaseValidValue(oTmp.toString()));
          }
//          if(!m_bSelectValuesOnlyAtBoundaries &&
//              oVTRange.getMaxValue().isMaximum()) {
//            ValueType oTmp = oVTRange.getValidRandomValue();       
//            io_colValues.add(new TestCaseValidValue(oTmp.toString()));
//          }
        }       
       
        // add value for upper boundary (only if it is not the absolute maximum)
        if(m_bSelectValuesAlsoAtAbsoluteBoundaries ||
            !(oVTRange.getMaxValue().isMaximum() && oVTRange.isMaxIncluded())) {
          if(oVTRange.isMaxIncluded())
          {
            io_colValues.add(new TestCaseValidValue(oVTRange.getMaxValue().toString()));
          }
          else
          {
            OrderedValueType oTmp = oVTRange.getMaxValue().getLowerValueMinDistance();
            io_colValues.add(new TestCaseValidValue(oTmp.toString()));
          }
//          if(!m_bSelectValuesOnlyAtBoundaries &&
//              oVTRange.getMinValue().isMinimum()) {
//            ValueType oTmp = oVTRange.getValidRandomValue();       
//            io_colValues.add(new TestCaseValidValue(oTmp.toString()));
View Full Code Here

TOP

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

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.