mirror of
https://github.com/apache/struts.git
synced 2026-08-05 22:56:59 +00:00
Adds missing header with license
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
.form-group .errorMessage {
|
||||
list-style: none;
|
||||
font-weight: bold;
|
||||
|
||||
+5
-5
@@ -101,7 +101,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
|
||||
assertEquals("required", cfg.getType());
|
||||
assertEquals("foo", cfg.getParams().get("fieldName"));
|
||||
assertEquals("You must enter a value for foo.", cfg.getDefaultMessage());
|
||||
assertEquals(4, cfg.getLocation().getLineNumber());
|
||||
assertEquals(24, cfg.getLocation().getLineNumber());
|
||||
|
||||
cfg = (ValidatorConfig) configs.get(3);
|
||||
assertEquals("required", cfg.getType());
|
||||
@@ -124,7 +124,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
|
||||
try {
|
||||
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileName3);
|
||||
} catch (XWorkException ex) {
|
||||
assertTrue("Wrong line number", 3 == ex.getLocation().getLineNumber());
|
||||
assertTrue("Wrong line number", 23 == ex.getLocation().getLineNumber());
|
||||
pass = true;
|
||||
}
|
||||
assertTrue("Validation file should have thrown exception", pass);
|
||||
@@ -137,7 +137,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
|
||||
try {
|
||||
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileName4);
|
||||
} catch (XWorkException ex) {
|
||||
assertTrue("Wrong line number: " + ex.getLocation(), 13 == ex.getLocation().getLineNumber());
|
||||
assertTrue("Wrong line number: " + ex.getLocation(), 33 == ex.getLocation().getLineNumber());
|
||||
pass = true;
|
||||
}
|
||||
assertTrue("Validation file should have thrown exception", pass);
|
||||
@@ -150,7 +150,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
|
||||
try {
|
||||
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileNameFail);
|
||||
} catch (XWorkException ex) {
|
||||
assertTrue("Wrong line number: " + ex.getLocation(), 8 == ex.getLocation().getLineNumber());
|
||||
assertTrue("Wrong line number: " + ex.getLocation(), 28 == ex.getLocation().getLineNumber());
|
||||
pass = true;
|
||||
}
|
||||
assertTrue("Validation file should have thrown exception", pass);
|
||||
@@ -163,7 +163,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
|
||||
try {
|
||||
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileName5);
|
||||
} catch (XWorkException ex) {
|
||||
assertTrue("Wrong line number", 3 == ex.getLocation().getLineNumber());
|
||||
assertTrue("Wrong line number", 23 == ex.getLocation().getLineNumber());
|
||||
pass = true;
|
||||
}
|
||||
assertTrue("Validation file should have thrown exception", pass);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class StaticContentLoaderTest extends TestCase {
|
||||
|
||||
public void testValidRersources() throws IOException {
|
||||
contentLoader.findStaticResource("/struts/resource.css", req, res);
|
||||
assertEquals("heya!", res.getContentAsString());
|
||||
assertTrue(res.getContentAsString().contains("heya!"));
|
||||
}
|
||||
|
||||
public void testInvalidRersources1() throws IOException {
|
||||
|
||||
@@ -1 +1,19 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
heya!
|
||||
@@ -356,6 +356,7 @@
|
||||
<exclude>src/test/resources/org/apache/struts2/interceptor/validation/*</exclude>
|
||||
<exclude>src/site/resources/tags/**</exclude>
|
||||
<exclude>src/main/resources/*LICENSE.txt</exclude>
|
||||
<exclude>src/test/resources/com/opensymphony/xwork2/somefile.txt</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
Reference in New Issue
Block a user