Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
caopu16
whatsmars
提交
67be3184
W
whatsmars
项目概览
caopu16
/
whatsmars
与 Fork 源项目一致
Fork自
武汉红喜 / whatsmars
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
whatsmars
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
67be3184
编写于
2月 01, 2018
作者:
武汉红喜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete mongodb
上级
9dbad483
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
2 addition
and
194 deletion
+2
-194
whatsmars-spring/pom.xml
whatsmars-spring/pom.xml
+1
-36
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/SpringTest.java
...src/test/java/org/hongxi/whatsmars/spring/SpringTest.java
+1
-1
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/data/mongodb/ApplicationConfigTest.java
.../whatsmars/spring/data/mongodb/ApplicationConfigTest.java
+0
-48
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/data/mongodb/core/CoreMatchers.java
...ngxi/whatsmars/spring/data/mongodb/core/CoreMatchers.java
+0
-49
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/data/mongodb/order/OrderMatchers.java
...xi/whatsmars/spring/data/mongodb/order/OrderMatchers.java
+0
-60
未找到文件。
whatsmars-spring/pom.xml
浏览文件 @
67be3184
...
...
@@ -14,12 +14,6 @@
<name>
${project.artifactId}
</name>
<url>
http://maven.apache.org
</url>
<properties>
<querydsl.version>
2.9.0
</querydsl.version>
<hamcrest.version>
1.3
</hamcrest.version>
<spring-mongodb.version>
1.2.0.RELEASE
</spring-mongodb.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework
</groupId>
...
...
@@ -43,12 +37,6 @@
<artifactId>
javax.servlet-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-mongodb
</artifactId>
<version>
${spring-mongodb.version}
</version>
</dependency>
<dependency>
<groupId>
org.aspectj
</groupId>
<artifactId>
aspectjweaver
</artifactId>
...
...
@@ -58,14 +46,6 @@
<artifactId>
aspectjtools
</artifactId>
</dependency>
<!-- Querydsl -->
<dependency>
<groupId>
com.mysema.querydsl
</groupId>
<artifactId>
querydsl-mongodb
</artifactId>
<version>
${querydsl.version}
</version>
</dependency>
<!-- logging -->
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
...
...
@@ -83,24 +63,9 @@
<artifactId>
logback-classic
</artifactId>
</dependency>
<!-- test -->
<dependency>
<groupId>
org.hamcrest
</groupId>
<artifactId>
hamcrest-library
</artifactId>
<version>
${hamcrest.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.hamcrest
</groupId>
<artifactId>
hamcrest-core
</artifactId>
<version>
${hamcrest.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit-dep
</artifactId>
<version>
4.10
</version>
<scope>
test
</scope>
<artifactId>
junit
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
...
...
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/
XxDemo
.java
→
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/
SpringTest
.java
浏览文件 @
67be3184
...
...
@@ -12,7 +12,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
"/spring-context.xml"
)
public
class
XxDemo
{
public
class
SpringTest
{
@Autowired
private
Mars
mars
;
...
...
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/data/mongodb/ApplicationConfigTest.java
已删除
100644 → 0
浏览文件 @
9dbad483
/*
* Copyright 2012 the original author or authors.
*
* Licensed 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.
*/
package
org.hongxi.whatsmars.spring.data.mongodb
;
import
org.junit.Test
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.support.ClassPathXmlApplicationContext
;
import
static
org
.
hamcrest
.
CoreMatchers
.
is
;
import
static
org
.
hamcrest
.
CoreMatchers
.
notNullValue
;
import
static
org
.
junit
.
Assert
.
assertThat
;
/**
* Integration test bootstrapping an {@link ApplicationContext} from both XML and JavaConfig to assure the general setup
* is working.
*
* @author Oliver Gierke
*/
public
class
ApplicationConfigTest
{
//@Test
public
void
bootstrapAppFromJavaConfig
()
{
ApplicationContext
context
=
new
AnnotationConfigApplicationContext
(
ApplicationConfig
.
class
);
assertThat
(
context
,
is
(
notNullValue
()));
}
//@Test
public
void
bootstrapAppFromXml
()
{
ApplicationContext
context
=
new
ClassPathXmlApplicationContext
(
"META-INF/spring/application-context.xml"
);
assertThat
(
context
,
is
(
notNullValue
()));
}
}
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/data/mongodb/core/CoreMatchers.java
已删除
100644 → 0
浏览文件 @
9dbad483
/*
* Copyright 2012 the original author or authors.
*
* Licensed 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.
*/
package
org.hongxi.whatsmars.spring.data.mongodb.core
;
import
org.hamcrest.Matcher
;
import
static
org
.
hamcrest
.
Matchers
.
hasProperty
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
/**
* Custom matchers to ease assertions on our domain classes.
*
* @author Oliver Gierke
*/
public
class
CoreMatchers
{
/**
* Syntactic sugar to make Matchers more readable.
*
* @param matcher must not be {@literal null}.
* @return
*/
public
static
<
T
>
Matcher
<
T
>
with
(
Matcher
<
T
>
matcher
)
{
return
matcher
;
}
/**
* Matches if the {@link Product} has the given name.
*
* @param name must not be {@literal null}.
* @return
*/
public
static
Matcher
<
Product
>
named
(
String
name
)
{
return
hasProperty
(
"name"
,
is
(
name
));
}
}
whatsmars-spring/src/test/java/org/hongxi/whatsmars/spring/data/mongodb/order/OrderMatchers.java
已删除
100644 → 0
浏览文件 @
9dbad483
/*
* Copyright 2012 the original author or authors.
*
* Licensed 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.
*/
package
org.hongxi.whatsmars.spring.data.mongodb.order
;
import
org.hongxi.whatsmars.spring.data.mongodb.core.Product
;
import
org.hamcrest.Matcher
;
import
static
org
.
hamcrest
.
Matchers
.
hasItem
;
import
static
org
.
hamcrest
.
Matchers
.
hasProperty
;
/**
* Matchers to ease assertions on found {@link Order}s.
*
* @author Oliver Gierke
*/
public
class
OrderMatchers
{
/**
* Matches if the source {@link Iterable} has an {@link Order} that matches the given {@link Matcher}.
*
* @param matcher must not be {@literal null}.
* @return
*/
public
static
<
T
>
Matcher
<
Iterable
<?
super
T
>>
containsOrder
(
Matcher
<?
super
T
>
matcher
)
{
return
hasItem
(
matcher
);
}
/**
* Matches if the {@link Order} has a {@link LineItem} matching the given {@link Matcher}.
*
* @param matcher must not be {@literal null}.
* @return
*/
public
static
Matcher
<
Order
>
LineItem
(
Matcher
<
LineItem
>
matcher
)
{
return
hasProperty
(
"lineItems"
,
hasItem
(
matcher
));
}
/**
* Matches if the {@link LineItem} refers to a {@link Product} that matches the given {@link Matcher}.
*
* @param matcher must not be {@literal null}.
* @return
*/
public
static
Matcher
<
LineItem
>
Product
(
Matcher
<
Product
>
matcher
)
{
return
hasProperty
(
"product"
,
matcher
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录