Package org.apache.sling.ide.eclipse.internal.validation

Examples of org.apache.sling.ide.eclipse.internal.validation.ServiceComponentHeaderValidator


        String sch = "OSGI-INF/descriptor1.xml, OSGI-INF/descriptor2.xml";
       
        createJavaProject(sch);

        ServiceComponentHeaderValidator validator = new ServiceComponentHeaderValidator();
        List<IFile> missingDescriptors = validator.findMissingScrDescriptors(projectRule.getProject().getFile(
                "bin/META-INF/MANIFEST.MF"));

        assertThat("missingDescriptors.size", missingDescriptors.size(), equalTo(2));
        assertThat("missingDescriptors[0].projectRelativePath", missingDescriptors.get(0).getProjectRelativePath(),
                equalTo(Path.fromPortableString("bin/OSGI-INF/descriptor1.xml")));
View Full Code Here


    @Test
    public void wildCardHeaderIsIgnored() throws CoreException, IOException, InterruptedException {

        createJavaProject("OSGI-INF/*.xml");

        ServiceComponentHeaderValidator validator = new ServiceComponentHeaderValidator();
        List<IFile> missingDescriptors = validator.findMissingScrDescriptors(projectRule.getProject().getFile(
                "bin/META-INF/MANIFEST.MF"));

        assertThat("missingDescriptors.size", missingDescriptors.size(), equalTo(0));
    }
View Full Code Here

            public IProject call() throws Exception {
                return projectRule.getProject();
            }
        }, hasFile("bin/OSGI-INF/descriptor.xml"));

        ServiceComponentHeaderValidator validator = new ServiceComponentHeaderValidator();
        List<IFile> missingDescriptors = validator.findMissingScrDescriptors(projectRule.getProject().getFile(
                "bin/META-INF/MANIFEST.MF"));

        assertThat("missingDescriptors.size", missingDescriptors.size(), equalTo(0));
    }
View Full Code Here

    @Test
    public void manifestNotUnderOutputDirectoryIsIgnored() throws CoreException, IOException, InterruptedException {

        createJavaProject("OSGI-INF/descriptor.xml");

        ServiceComponentHeaderValidator validator = new ServiceComponentHeaderValidator();
        List<IFile> missingDescriptors = validator.findMissingScrDescriptors(projectRule.getProject().getFile(
                "src/META-INF/MANIFEST.MF"));

        assertThat("missingDescriptors.size", missingDescriptors.size(), equalTo(0));
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.ide.eclipse.internal.validation.ServiceComponentHeaderValidator

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.