Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Nov 17, 2023
1 parent f5f9a3f commit 27531ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ void testMultiWithCustom() {
context.request().setAttribute("categories", CATEGORIES_MULTIPLE);
context.request().setAttribute("customAttributes", new String[] { "attr1=value1", "data-attr2=5", "attr3" });
CSSInclude underTest = AdaptTo.notNull(context.request(), CSSInclude.class);
assertEquals("<link rel=\"stylesheet\" href=\"/etc/clientlibs/app1/clientlib3.min.css\" type=\"text/css\" attr1=\"value1\" data-attr2=\"5\" attr3>\n"
+ "<link rel=\"stylesheet\" href=\"/etc.clientlibs/app1/clientlibs/clientlib4_proxy.min.css\" type=\"text/css\" attr1=\"value1\" data-attr2=\"5\" attr3>\n"
+ "<link rel=\"stylesheet\" href=\"/etc.clientlibs/app1/clientlibs/clientlib5_proxy.min.css\" type=\"text/css\" attr1=\"value1\" data-attr2=\"5\" attr3>\n",
assertEquals("<link attr1=\"value1\" attr3 data-attr2=\"5\" href=\"/etc/clientlibs/app1/clientlib3.min.css\" rel=\"stylesheet\" type=\"text/css\">\n"
+ "<link attr1=\"value1\" attr3 data-attr2=\"5\" href=\"/etc.clientlibs/app1/clientlibs/clientlib4_proxy.min.css\" rel=\"stylesheet\" type=\"text/css\">\n"
+ "<link attr1=\"value1\" attr3 data-attr2=\"5\" href=\"/etc.clientlibs/app1/clientlibs/clientlib5_proxy.min.css\" rel=\"stylesheet\" type=\"text/css\">\n",
underTest.getInclude());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ void testMultiAttributesWithCustom() {
context.request().setAttribute("type", "text/javascript");
context.request().setAttribute("customAttributes", new String[] { "attr1=value1", "data-attr2=5", "attr3" });
JSInclude underTest = AdaptTo.notNull(context.request(), JSInclude.class);
assertEquals("<script src=\"/etc/clientlibs/app1/clientlib3.min.js\" "
+ "async nomodule type=\"text/javascript\" attr1=\"value1\" data-attr2=\"5\" attr3></script>\n"
+ "<script src=\"/etc.clientlibs/app1/clientlibs/clientlib4_proxy.min.js\" "
+ "async nomodule type=\"text/javascript\" attr1=\"value1\" data-attr2=\"5\" attr3></script>\n"
+ "<script src=\"/etc.clientlibs/app1/clientlibs/clientlib5_proxy.min.js\" "
+ "async nomodule type=\"text/javascript\" attr1=\"value1\" data-attr2=\"5\" attr3></script>\n",
assertEquals(
"<script async attr1=\"value1\" attr3 data-attr2=\"5\" nomodule "
+ "src=\"/etc/clientlibs/app1/clientlib3.min.js\" type=\"text/javascript\"></script>\n"
+ "<script async attr1=\"value1\" attr3 data-attr2=\"5\" nomodule "
+ "src=\"/etc.clientlibs/app1/clientlibs/clientlib4_proxy.min.js\" type=\"text/javascript\"></script>\n"
+ "<script async attr1=\"value1\" attr3 data-attr2=\"5\" nomodule "
+ "src=\"/etc.clientlibs/app1/clientlibs/clientlib5_proxy.min.js\" type=\"text/javascript\"></script>\n",
underTest.getInclude());
}

Expand Down

0 comments on commit 27531ee

Please sign in to comment.