File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
main/java/com/qulice/maven
test/java/com/qulice/maven Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ public void setAsser(final Collection<String> ass) {
298298 * @return Charset of the source files
299299 */
300300 public Charset encoding () {
301- String charset = this .iproperties .getProperty ("project.build.sourceEncoding" );
301+ String charset = this .iproject . getProperties () .getProperty ("project.build.sourceEncoding" );
302302 if (charset == null ) {
303303 charset = "UTF-8" ;
304304 }
Original file line number Diff line number Diff line change @@ -147,4 +147,17 @@ void producesEmptyExcludesWhenNoMatches() {
147147 Matchers .empty ()
148148 );
149149 }
150+
151+ /**
152+ * Default source files encoding should be UFT-8.
153+ */
154+ @ Test
155+ void defaultEncodingIsUTF8 () {
156+ final DefaultMavenEnvironment env = new DefaultMavenEnvironment ();
157+ MatcherAssert .assertThat (
158+ "Default encoding should be UTF-8" ,
159+ env .encoding (),
160+ Matchers .is ("UTF-8" )
161+ );
162+ }
150163}
Original file line number Diff line number Diff line change @@ -52,9 +52,8 @@ public final class MavenProjectMocker {
5252 * In this basedir.
5353 * @param dir The directory
5454 * @return This object
55- * @throws Exception If something wrong happens inside
5655 */
57- public MavenProjectMocker inBasedir (final File dir ) throws Exception {
56+ public MavenProjectMocker inBasedir (final File dir ) {
5857 Mockito .doReturn (dir ).when (this .project ).getBasedir ();
5958 final Build build = Mockito .mock (Build .class );
6059 Mockito .doReturn (build ).when (this .project ).getBuild ();
You can’t perform that action at this time.
0 commit comments