//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void test_of_fileNoPrefix() throws Exception
        public virtual void test_of_fileNoPrefix()
        {
            ResourceLocator test = ResourceLocator.of("src/test/resources/com/opengamma/strata/collect/io/TestFile.txt");

            assertEquals(test.Locator, "file:src/test/resources/com/opengamma/strata/collect/io/TestFile.txt");
            assertEquals(test.ByteSource.read()[0], 'H');
            assertEquals(test.CharSource.readLines(), ImmutableList.of("HelloWorld"));
            assertEquals(test.getCharSource(StandardCharsets.UTF_8).readLines(), ImmutableList.of("HelloWorld"));
            assertEquals(test.ToString(), "file:src/test/resources/com/opengamma/strata/collect/io/TestFile.txt");
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void test_of_classpath() throws Exception
        public virtual void test_of_classpath()
        {
            ResourceLocator test = ResourceLocator.of("classpath:com/opengamma/strata/collect/io/TestFile.txt");

            assertTrue(test.Locator.StartsWith("classpath", StringComparison.Ordinal));
            assertTrue(test.Locator.EndsWith("com/opengamma/strata/collect/io/TestFile.txt", StringComparison.Ordinal));
            assertEquals(test.ByteSource.read()[0], 'H');
            assertEquals(test.CharSource.readLines(), ImmutableList.of("HelloWorld"));
            assertEquals(test.getCharSource(StandardCharsets.UTF_8).readLines(), ImmutableList.of("HelloWorld"));
            assertTrue(test.ToString().StartsWith("classpath", StringComparison.Ordinal));
            assertTrue(test.ToString().EndsWith("com/opengamma/strata/collect/io/TestFile.txt", StringComparison.Ordinal));
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void test_of_invalid() throws Exception
        public virtual void test_of_invalid()
        {
            assertThrowsIllegalArg(() => ResourceLocator.of("classpath:http:https:file:/foobar.txt"));
        }