Skip to content

Commit

Permalink
Adds missing header with license
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Oct 21, 2017
1 parent ce335f1 commit fd8e3bc
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
18 changes: 18 additions & 0 deletions apps/rest-showcase/src/main/webapp/css/app.css
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void testParser() {
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());
Expand All @@ -124,7 +124,7 @@ public void testParserWithBadValidation() {
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);
Expand All @@ -137,7 +137,7 @@ public void testParserWithBadXML() {
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);
Expand All @@ -150,7 +150,7 @@ public void testParserWithBadXML2() {
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);
Expand All @@ -163,7 +163,7 @@ public void testValidatorDefinitionsWithBadClassName() {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testCanHandle() {

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 {
Expand Down
18 changes: 18 additions & 0 deletions core/src/test/resources/org/apache/struts2/static/resource.css
Original file line number Diff line number Diff line change
@@ -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!
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit fd8e3bc

Please sign in to comment.