Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testScanProcessArchivePathForCmmnResources() throws java.net.MalformedURLException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void testScanProcessArchivePathForCmmnResources()
        {
            // given: scanning the relative test resource root
            URLClassLoader classLoader               = new URLClassLoader(new URL[] { new URL("file:") });
            string         processRootPath           = "classpath:org/camunda/bpm/container/impl/jmx/deployment/case/";
            IDictionary <string, sbyte[]> scanResult = ProcessApplicationScanningUtil.findResources(classLoader, processRootPath, null);

            // expect: finds only the CMMN process file and not treats the 'cmmn' folder
            assertEquals(1, scanResult.Count);
            string processFileName = "VfsProcessScannerTest.cmmn";

            assertTrue("'" + processFileName + "' not found", contains(scanResult, processFileName));
            assertFalse("'cmmn' in resource path found", contains(scanResult, "caseResource.txt"));
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testScanProcessArchivePathWithAdditionalResourceSuffixes() throws java.net.MalformedURLException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void testScanProcessArchivePathWithAdditionalResourceSuffixes()
        {
            URLClassLoader classLoader     = new URLClassLoader(new URL[] { new URL("file:") });
            string         processRootPath = "classpath:org/camunda/bpm/container/impl/jmx/deployment/script/";

            string[] additionalResourceSuffixes      = new string[] { "py", "groovy", "rb" };
            IDictionary <string, sbyte[]> scanResult = ProcessApplicationScanningUtil.findResources(classLoader, processRootPath, null, additionalResourceSuffixes);

            assertEquals(4, scanResult.Count);
            string processFileName = "VfsProcessScannerTest.bpmn20.xml";

            assertTrue("'" + processFileName + "' not found", contains(scanResult, processFileName));
            assertTrue("'hello.py' in resource path found", contains(scanResult, "hello.py"));
            assertTrue("'hello.rb' in resource path found", contains(scanResult, "hello.rb"));
            assertTrue("'hello.groovy' in resource path found", contains(scanResult, "hello.groovy"));
        }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: protected java.util.Map<String, byte[]> findResources(final ClassLoader processApplicationClassloader, String paResourceRoot, String[] additionalResourceSuffixes)
        protected internal virtual IDictionary <string, sbyte[]> findResources(ClassLoader processApplicationClassloader, string paResourceRoot, string[] additionalResourceSuffixes)
        {
            return(ProcessApplicationScanningUtil.findResources(processApplicationClassloader, paResourceRoot, metaFileUrl, additionalResourceSuffixes));
        }