001 /*
002 * $Id: ModelInitializationError.java,v 1.1 2012/04/19 19:52:03 oboehm Exp $
003 *
004 * Copyright (c) 2012 by Oliver Boehm
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 *
018 * (c)reated 19.04.2012 by oliver (ob@oasd.de)
019 */
020
021 package patterntesting.runtime.junit.internal;
022
023 import java.util.*;
024
025 import org.junit.runners.model.InitializationError;
026
027 /**
028 * This error introduced for the support of JUnit 4.7 because in this
029 * version the used constructor is missing.
030 *
031 * @author oliver (ob@aosd.de)
032 * @since 1.2.20 (19.04.2012)
033 */
034 public class ModelInitializationError extends InitializationError {
035
036 private static final long serialVersionUID = 20120419L;
037
038 /**
039 * Instantiates a new model initialization error.
040 *
041 * @param error the error
042 */
043 public ModelInitializationError(final Throwable error) {
044 super(asList(error));
045 }
046
047 private static List<Throwable> asList(Throwable error) {
048 List<Throwable> errors = new ArrayList<Throwable>(1);
049 errors.add(error);
050 return errors;
051 }
052
053 }
054