ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/webresources/AbstractTestResourceSetMount.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/test/org/apache/catalina/webresources/AbstractTestResourceSetMount.java
Status
scanned
Type
file
Name
AbstractTestResourceSetMount.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2464 (2.4 KB)
MD5
13ed32483793ccab6a5c406c0790f9bc
SHA1
22209cad4bf5179b8f09c58c2231ab7334c0738c
SHA256
8a33e6d85c848f484259b3dff1e61683d40893c6aa7ce9549091608bc57e69af
SHA512

      
    
SHA1_git
d7bb5d4f1fcd2608f8ee72b4f0f7c579b68a8da7
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
AbstractTestResourceSetMount.java | 2.4 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.catalina.webresources; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.Set; import org.junit.Assert; import org.junit.Test; import org.apache.catalina.WebResource; public abstract class AbstractTestResourceSetMount extends AbstractTestResourceSet { @Override public final String getMount() { return "/mount"; } @Override public final String getMountPath() { return "/mount"; } @Test public final void testGetResourceAbove() { WebResource webResource = resourceRoot.getResource("/"); Assert.assertFalse(webResource.exists()); } @Test public final void testListAbove() { String[] results = resourceRoot.list("/"); Assert.assertNotNull(results); Assert.assertEquals(1, results.length); Assert.assertEquals(getMount().substring(1), results[0]); } @Test public final void testListWebAppPathsAbove() { Set<String> results = resourceRoot.listWebAppPaths("/"); Assert.assertNotNull(results); Assert.assertEquals(1, results.size()); Assert.assertTrue(results.contains(getMount() + "/")); } @Test public void testMkdirAbove() { Assert.assertFalse(resourceRoot.mkdir("/")); } @Test public void testWriteAbove() { InputStream is = new ByteArrayInputStream("test".getBytes()); Assert.assertFalse(resourceRoot.write("/", is, false)); } @Override public void testNoArgConstructor() { // NO-OP } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
46.12
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9