Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
fe3aad4a
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fe3aad4a
编写于
9月 23, 2015
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Latest dependency updates (H2 1.4.189, Underscore.js 1.8.3)
上级
cffad9d4
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
14 deletion
+15
-14
build.gradle
build.gradle
+4
-4
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java
...rk/web/servlet/resource/WebJarsResourceResolverTests.java
+11
-10
未找到文件。
build.gradle
浏览文件 @
fe3aad4a
...
...
@@ -141,7 +141,7 @@ configure(allprojects) { project ->
testCompile
(
"org.hamcrest:hamcrest-all:${hamcrestVersion}"
)
sniffer
(
"org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}"
)
javaApiSignature
(
"org.codehaus.mojo.signature:java16:1.1@signature"
)
//
as
from JDK 6 update 18
javaApiSignature
(
"org.codehaus.mojo.signature:java16:1.1@signature"
)
//
API level
from JDK 6 update 18
}
task
copyJavaApiSignature
(
type:
Copy
)
{
...
...
@@ -628,7 +628,7 @@ project("spring-jdbc") {
optional
(
"javax.transaction:javax.transaction-api:${jtaVersion}"
)
optional
(
"com.mchange:c3p0:0.9.5.1"
)
optional
(
"org.hsqldb:hsqldb:${hsqldbVersion}"
)
optional
(
"com.h2database:h2:1.4.18
8
"
)
optional
(
"com.h2database:h2:1.4.18
9
"
)
optional
(
"org.apache.derby:derby:10.11.1.1"
)
optional
(
"org.apache.derby:derbyclient:10.11.1.1"
)
}
...
...
@@ -937,7 +937,7 @@ project("spring-webmvc") {
testCompile
(
"org.slf4j:slf4j-jcl:${slf4jVersion}"
)
testCompile
(
"org.jruby:jruby:${jrubyVersion}"
)
testCompile
(
"org.python:jython-standalone:2.5.3"
)
testCompile
(
"org.webjars:underscorejs:1.8.
2
"
)
testCompile
(
"org.webjars:underscorejs:1.8.
3
"
)
}
}
...
...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java
浏览文件 @
fe3aad4a
...
...
@@ -16,16 +16,8 @@
package
org.springframework.web.servlet.resource
;
import
static
org
.
junit
.
Assert
.*;
import
static
org
.
mockito
.
BDDMockito
.*;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
never
;
import
static
org
.
mockito
.
Mockito
.
times
;
import
static
org
.
mockito
.
Mockito
.
verify
;
import
java.util.Collections
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
org.junit.Before
;
...
...
@@ -35,6 +27,13 @@ import org.springframework.core.io.ClassPathResource;
import
org.springframework.core.io.Resource
;
import
org.springframework.mock.web.test.MockHttpServletRequest
;
import
static
org
.
junit
.
Assert
.*;
import
static
org
.
mockito
.
BDDMockito
.*;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
never
;
import
static
org
.
mockito
.
Mockito
.
times
;
import
static
org
.
mockito
.
Mockito
.
verify
;
/**
* Unit tests for
* {@link org.springframework.web.servlet.resource.WebJarsResourceResolver}.
...
...
@@ -51,6 +50,7 @@ public class WebJarsResourceResolverTests {
private
HttpServletRequest
request
=
new
MockHttpServletRequest
();
@Before
public
void
setup
()
{
// for this to work, an actual WebJar must be on the test classpath
...
...
@@ -59,6 +59,7 @@ public class WebJarsResourceResolverTests {
this
.
chain
=
mock
(
ResourceResolverChain
.
class
);
}
@Test
public
void
resolveUrlExisting
()
{
this
.
locations
=
Collections
.
singletonList
(
new
ClassPathResource
(
"/META-INF/resources/webjars/"
,
getClass
()));
...
...
@@ -87,7 +88,7 @@ public class WebJarsResourceResolverTests {
@Test
public
void
resolveUrlWebJarResource
()
{
String
file
=
"/underscorejs/underscore.js"
;
String
expected
=
"/underscorejs/1.8.
2
/underscore.js"
;
String
expected
=
"/underscorejs/1.8.
3
/underscore.js"
;
given
(
this
.
chain
.
resolveUrlPath
(
file
,
this
.
locations
)).
willReturn
(
null
);
given
(
this
.
chain
.
resolveUrlPath
(
expected
,
this
.
locations
)).
willReturn
(
expected
);
...
...
@@ -139,7 +140,7 @@ public class WebJarsResourceResolverTests {
public
void
resolveResourceWebJar
()
{
Resource
expected
=
mock
(
Resource
.
class
);
String
file
=
"/underscorejs/underscore.js"
;
String
expectedPath
=
"/underscorejs/1.8.
2
/underscore.js"
;
String
expectedPath
=
"/underscorejs/1.8.
3
/underscore.js"
;
this
.
locations
=
Collections
.
singletonList
(
new
ClassPathResource
(
"/META-INF/resources/webjars/"
,
getClass
()));
given
(
this
.
chain
.
resolveResource
(
this
.
request
,
expectedPath
,
this
.
locations
)).
willReturn
(
expected
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录