Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldUseFallBackWhenCustomClassLoaderIsNull()
        public virtual void shouldUseFallBackWhenCustomClassLoaderIsNull()
        {
            File file = IoUtil.getClasspathFile(TEST_FILE_NAME, null);

            assertThat(file).NotNull;
            assertThat(file.Name).isEqualTo("testFile.txt");
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldUseFallBackWhenCustomClassLoaderIsWrong()
        public virtual void shouldUseFallBackWhenCustomClassLoaderIsWrong()
        {
            File file = IoUtil.getClasspathFile(TEST_FILE_NAME, new ClassLoaderAnonymousInnerClass(this));

            assertThat(file).NotNull;
            assertThat(file.Name).isEqualTo("testFile.txt");
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void getFileFromClassPath()
        public virtual void getFileFromClassPath()
        {
            File file = IoUtil.getClasspathFile(TEST_FILE_NAME);

            assertThat(file).NotNull;
            assertThat(file.Name).isEqualTo("testFile.txt");
        }
Esempio n. 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldFailGetFileFromClassPathWithNull()
        public virtual void shouldFailGetFileFromClassPathWithNull()
        {
            try
            {
                IoUtil.getClasspathFile(null);
                fail("Expected: IoUtilException");
            }
            catch (IoUtilException)
            {
                // happy way
            }
        }