// Path: impl/src/main/java/com/geewhiz/pacify/checks/impl/CheckPropertyDuplicateInPropertyFile.java
// public class CheckPropertyDuplicateInPropertyFile implements Check {
// 
// 	PropertyResolveManager propertyResolveManager;
// 
// 	public CheckPropertyDuplicateInPropertyFile(PropertyResolveManager propertyResolveManager) {
// 		this.propertyResolveManager = propertyResolveManager;
// 	}
// 
// 	public LinkedHashSet<Defect> checkForErrors() {
// 		LinkedHashSet<Defect> defects = new LinkedHashSet<Defect>();
// 
// 		defects.addAll(propertyResolveManager.checkForDuplicateEntry());
// 
// 		return defects;
// 	}
// }
// 
// Path: api/src/main/java/com/geewhiz/pacify/defect/Defect.java
// public interface Defect {
// 
//     String getDefectMessage();
// 
// }


import java.util.Collections;
import java.util.LinkedHashSet;
import org.junit.Assert;
import org.junit.Test;
import com.geewhiz.pacify.checks.impl.CheckPropertyDuplicateInPropertyFile;
import com.geewhiz.pacify.defect.Defect;

/*-
 * ========================LICENSE_START=================================
 * com.geewhiz.pacify.resolver.file-resolver
 * %%
 * Copyright (C) 2011 - 2017 Sven Oppermann
 * %%
 * 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.
 * =========================LICENSE_END==================================
 */

package com.geewhiz.pacify;




public class TestCheckPropertyDuplicateDefinedInPropertyFile extends FileResolverTestBase {

    @Test
    public void checkForNotCorrect() {
        String testFolder = "checkPropertyDuplicateDefinedInPropertyFile/wrong";

        LinkedHashSet<Defect> defects = createPrepareAndExecuteValidator(testFolder, createPropertyResolveManager(Collections.<String, String> emptyMap()),
                new CheckPropertyDuplicateInPropertyFile(createPropertyResolveManager(testFolder)));

        Assert.assertEquals(2, defects.size());
    }

    @Test
    public void checkForCorrect() {
        String testFolder = "checkPropertyDuplicateDefinedInPropertyFile/correct";

        LinkedHashSet<Defect> defects = createPrepareAndExecuteValidator(testFolder, createPropertyResolveManager(Collections.<String, String> emptyMap()),

// Path: impl/src/main/java/com/geewhiz/pacify/checks/impl/CheckPropertyDuplicateInPropertyFile.java
// public class CheckPropertyDuplicateInPropertyFile implements Check {
// 
// 	PropertyResolveManager propertyResolveManager;
// 
// 	public CheckPropertyDuplicateInPropertyFile(PropertyResolveManager propertyResolveManager) {
// 		this.propertyResolveManager = propertyResolveManager;
// 	}
// 
// 	public LinkedHashSet<Defect> checkForErrors() {
// 		LinkedHashSet<Defect> defects = new LinkedHashSet<Defect>();
// 
// 		defects.addAll(propertyResolveManager.checkForDuplicateEntry());
// 
// 		return defects;
// 	}
// }
// 
// Path: api/src/main/java/com/geewhiz/pacify/defect/Defect.java
// public interface Defect {
// 
//     String getDefectMessage();
// 
// }


// Path: resolver/file-resolver/src/test/java/com/geewhiz/pacify/TestCheckPropertyDuplicateDefinedInPropertyFile.java
import java.util.Collections;
import java.util.LinkedHashSet;
import org.junit.Assert;
import org.junit.Test;
import com.geewhiz.pacify.checks.impl.CheckPropertyDuplicateInPropertyFile;
import com.geewhiz.pacify.defect.Defect;

/*-
 * ========================LICENSE_START=================================
 * com.geewhiz.pacify.resolver.file-resolver
 * %%
 * Copyright (C) 2011 - 2017 Sven Oppermann
 * %%
 * 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.
 * =========================LICENSE_END==================================
 */

package com.geewhiz.pacify;




public class TestCheckPropertyDuplicateDefinedInPropertyFile extends FileResolverTestBase {

    @Test
    public void checkForNotCorrect() {
        String testFolder = "checkPropertyDuplicateDefinedInPropertyFile/wrong";

        LinkedHashSet<Defect> defects = createPrepareAndExecuteValidator(testFolder, createPropertyResolveManager(Collections.<String, String> emptyMap()),
                new CheckPropertyDuplicateInPropertyFile(createPropertyResolveManager(testFolder)));

        Assert.assertEquals(2, defects.size());
    }

    @Test
    public void checkForCorrect() {
        String testFolder = "checkPropertyDuplicateDefinedInPropertyFile/correct";

        LinkedHashSet<Defect> defects = createPrepareAndExecuteValidator(testFolder, createPropertyResolveManager(Collections.<String, String> emptyMap()),

                new CheckPropertyDuplicateInPropertyFile(createPropertyResolveManager(testFolder)));
