Ignore:
Timestamp:
09/04/12 17:15:28 (12 years ago)
Author:
sherbold
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-testgeneration/src/main/java/de/ugoe/cs/quest/testgeneration/RandomWalkGenerator.java

    r655 r766  
    11package de.ugoe.cs.quest.testgeneration; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.Collection; 
    54import java.util.HashSet; 
     
    7574     * <li>maxIter must be greater than or equal to numSequences 
    7675     * </ul> 
    77      * If one of these conditions is violated an {@link InvalidParameterException} is thrown. 
     76     * If one of these conditions is violated an {@link IllegalArgumentException} is thrown. 
    7877     * </p> 
    7978     *  
     
    9998        // check validity of the parameters 
    10099        if (numSequences < 1) { 
    101             throw new InvalidParameterException("number of sequences must be at least 1 but is " + 
     100            throw new IllegalArgumentException("number of sequences must be at least 1 but is " + 
    102101                numSequences); 
    103102        } 
    104103        if (maxLength < 1) { 
    105             throw new InvalidParameterException( 
     104            throw new IllegalArgumentException( 
    106105                                                "maximal allowed length of test cases must be at least 1 but is " + 
    107106                                                    maxLength); 
    108107        } 
    109108        if (minLength > maxLength) { 
    110             throw new InvalidParameterException( 
     109            throw new IllegalArgumentException( 
    111110                                                "minimal allowed length of test cases must be less than or equal to the maximal allowed length (min length: " + 
    112111                                                    minLength + " ; max length: " + maxLength + ")"); 
    113112        } 
    114113        if (maxIter < numSequences) { 
    115             throw new InvalidParameterException( 
     114            throw new IllegalArgumentException( 
    116115                                                "maximal number of iterations must greater than or equal to the number of sequences (number of sequences: " + 
    117116                                                    numSequences + 
     
    138137    public Collection<List<Event>> generateTestSuite(IStochasticProcess model) { 
    139138        if (model == null) { 
    140             throw new InvalidParameterException("model must not be null!"); 
     139            throw new IllegalArgumentException("model must not be null!"); 
    141140        } 
    142141 
Note: See TracChangeset for help on using the changeset viewer.