// Path: src/main/java/com/github/ferstl/maven/pomenforcers/model/DependencyScope.java
// public enum DependencyScope {
// 
//   IMPORT("import"),
//   COMPILE("compile"),
//   PROVIDED("provided"),
//   RUNTIME("runtime"),
//   SYSTEM("system"),
//   TEST("test");
// 
//   private static final Map<String, DependencyScope> dependencyScopeMap;
// 
//   static {
//     dependencyScopeMap = new LinkedHashMap<>();
//     for (DependencyScope scope : values()) {
//       dependencyScopeMap.put(scope.getScopeName(), scope);
//     }
//   }
// 
//   public static DependencyScope getByScopeName(String scopeName) {
//     requireNonNull(scopeName, "Scope name is null.");
// 
//     DependencyScope scope = dependencyScopeMap.get(scopeName);
//     if (scope == null) {
//       throw new IllegalArgumentException("Dependency scope'" + scopeName + "' does not exist.");
//     }
// 
//     return scope;
//   }
// 
//   private final String scopeName;
// 
//   DependencyScope(String name) {
//     this.scopeName = name;
//   }
// 
//   public String getScopeName() {
//     return this.scopeName;
//   }
// }


import org.junit.Before;
import org.junit.Test;
import com.github.ferstl.maven.pomenforcers.model.DependencyScope;
/*
 * Copyright (c) 2012 - 2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.ferstl.maven.pomenforcers;



/**
 * <p>
 * Abstract test for {@link PedanticDependencyOrderEnforcer} and
 * {@link PedanticDependencyManagementOrderEnforcer}. Both classes do the same thing but one works
 * on the managed dependencies and one on the dependencies themselves.
 * </p>
 */
public abstract class AbstractPedanticDependencyOrderEnforcerTest<T extends AbstractPedanticDependencyOrderEnforcer>
    extends AbstractPedanticEnforcerTest<T> {

  private DependencyAdder dependencyAdder;

  @Before
  public void setupDependencyAdder() {
    this.dependencyAdder = createDependencyAdder();
  }

  protected abstract DependencyAdder createDependencyAdder();

  @Test
  public void defaultSettingsCorrect() {
// Path: src/main/java/com/github/ferstl/maven/pomenforcers/model/DependencyScope.java
// public enum DependencyScope {
// 
//   IMPORT("import"),
//   COMPILE("compile"),
//   PROVIDED("provided"),
//   RUNTIME("runtime"),
//   SYSTEM("system"),
//   TEST("test");
// 
//   private static final Map<String, DependencyScope> dependencyScopeMap;
// 
//   static {
//     dependencyScopeMap = new LinkedHashMap<>();
//     for (DependencyScope scope : values()) {
//       dependencyScopeMap.put(scope.getScopeName(), scope);
//     }
//   }
// 
//   public static DependencyScope getByScopeName(String scopeName) {
//     requireNonNull(scopeName, "Scope name is null.");
// 
//     DependencyScope scope = dependencyScopeMap.get(scopeName);
//     if (scope == null) {
//       throw new IllegalArgumentException("Dependency scope'" + scopeName + "' does not exist.");
//     }
// 
//     return scope;
//   }
// 
//   private final String scopeName;
// 
//   DependencyScope(String name) {
//     this.scopeName = name;
//   }
// 
//   public String getScopeName() {
//     return this.scopeName;
//   }
// }


// Path: src/test/java/com/github/ferstl/maven/pomenforcers/AbstractPedanticDependencyOrderEnforcerTest.java
import org.junit.Before;
import org.junit.Test;
import com.github.ferstl.maven.pomenforcers.model.DependencyScope;

/*
 * Copyright (c) 2012 - 2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.ferstl.maven.pomenforcers;



/**
 * <p>
 * Abstract test for {@link PedanticDependencyOrderEnforcer} and
 * {@link PedanticDependencyManagementOrderEnforcer}. Both classes do the same thing but one works
 * on the managed dependencies and one on the dependencies themselves.
 * </p>
 */
public abstract class AbstractPedanticDependencyOrderEnforcerTest<T extends AbstractPedanticDependencyOrderEnforcer>
    extends AbstractPedanticEnforcerTest<T> {

  private DependencyAdder dependencyAdder;

  @Before
  public void setupDependencyAdder() {
    this.dependencyAdder = createDependencyAdder();
  }

  protected abstract DependencyAdder createDependencyAdder();

  @Test
  public void defaultSettingsCorrect() {
    this.dependencyAdder.addDependency("d.e.f", "a", DependencyScope.IMPORT);