11package org .jooby .issues ;
22
3+ import com .google .common .collect .ImmutableMap ;
4+ import org .jooby .Request ;
5+ import org .jooby .mvc .GET ;
6+ import org .jooby .mvc .Path ;
7+ import org .jooby .test .ServerFeature ;
38import static org .junit .Assert .assertEquals ;
9+ import org .junit .Test ;
410
511import java .lang .annotation .ElementType ;
612import java .lang .annotation .Retention ;
915import java .util .HashMap ;
1016import java .util .Map ;
1117
12- import org .jooby .Request ;
13- import org .jooby .mvc .GET ;
14- import org .jooby .mvc .Path ;
15- import org .jooby .test .ServerFeature ;
16- import org .junit .Test ;
17-
18- import com .google .common .collect .ImmutableMap ;
19-
2018public class Issue346 extends ServerFeature {
2119
2220 @ Target ({ElementType .METHOD , ElementType .TYPE , ElementType .ANNOTATION_TYPE })
@@ -60,17 +58,17 @@ public Object admin(final Request req) {
6058
6159 {
6260 use ("/1" , (req , rsp ) -> {
63- assertEquals (ImmutableMap .of ("priority" , 1.0 , "changefreq" , "always" ),
61+ assertEquals (ImmutableMap .of ("SitemapUrl. priority" , 1.0 , "SitemapUrl. changefreq" , "always" ),
6462 req .route ().attributes ());
6563 });
6664
6765 use ("/2" , (req , rsp ) -> {
68- assertEquals (ImmutableMap .of ("priority" , 0.5 , "changefreq" , "always" ),
66+ assertEquals (ImmutableMap .of ("SitemapUrl. priority" , 0.5 , "SitemapUrl. changefreq" , "always" ),
6967 req .route ().attributes ());
7068 });
7169
7270 use ("/3" , (req , rsp ) -> {
73- assertEquals (ImmutableMap .of ("priority" , 0.5 , "changefreq" , "always" , "role" , "admin" ),
71+ assertEquals (ImmutableMap .of ("SitemapUrl. priority" , 0.5 , "SitemapUrl. changefreq" , "always" , "role" , "admin" ),
7472 req .route ().attributes ());
7573 });
7674 use (Resource .class );
@@ -81,19 +79,19 @@ public void mvcAttrs() throws Exception {
8179 request ().get ("/1" )
8280 .expect (value -> {
8381 Map <String , Object > hash = toMap (value .substring (1 , value .length () - 1 ));
84- assertEquals (ImmutableMap .of ("priority" , "1.0" , "changefreq" , "always" ), hash );
82+ assertEquals (ImmutableMap .of ("SitemapUrl. priority" , "1.0" , "SitemapUrl. changefreq" , "always" ), hash );
8583 });
8684
8785 request ().get ("/2" )
8886 .expect (value -> {
8987 Map <String , Object > hash = toMap (value .substring (1 , value .length () - 1 ));
90- assertEquals (ImmutableMap .of ("priority" , "0.5" , "changefreq" , "always" ), hash );
88+ assertEquals (ImmutableMap .of ("SitemapUrl. priority" , "0.5" , "SitemapUrl. changefreq" , "always" ), hash );
9189 });
9290
9391 request ().get ("/3" )
9492 .expect (value -> {
9593 Map <String , Object > hash = toMap (value .substring (1 , value .length () - 1 ));
96- assertEquals (ImmutableMap .of ("priority" , "0.5" , "changefreq" , "always" , "role" , "admin" ),
94+ assertEquals (ImmutableMap .of ("SitemapUrl. priority" , "0.5" , "SitemapUrl. changefreq" , "always" , "role" , "admin" ),
9795 hash );
9896 });
9997 }
0 commit comments