我有一个包含2个测试的测试类:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContextTest.xml" })
@Transactional
@TransactionConfiguration(defaultRollback = true)
public class MyITest extends implements BeanFactoryAware {
private BeanFactory beanFactory;
@Test
public void test1() throws Exception {}
@Test
public void test2() throws Exception {}
}
Run Code Online (Sandbox Code Playgroud)
当我单独运行测试时,我没有错误,但是当我一起运行所有测试时,就会出现故障.此失败是由于某些测试修改应用程序上下文:
b = beanFactory.getBean("logDataSource", BasicDataSource.class);
b.set ...
Run Code Online (Sandbox Code Playgroud)
是否可以单独运行此测试?我只是想在test1启动它时读取所有必要的东西然后运行测试然后关闭所有必要的东西.然后开始test2.
这句话是什么意思?
the list functor represents a context of nondeterministic choice;
Run Code Online (Sandbox Code Playgroud)
在功能编程中的Functors的上下文中.
我想我明白Functor是某种"容器",能够在不改变结构的情况下将函数统一地应用于容器中的元素.所以也许是一个Functor代表一个可能失败的上下文或容器,但为什么list代表一个具有非确定性选择的上下文或容器?
使用SelectBoxIt.js创建100%宽度选择框时遇到一些麻烦
即使将CSS宽度设置为100%,选择框也不会填充100%的容器元素.
CSS:
.test1, .test2, .test2 .selectboxit, .test2 .selectboxit-options {
width: 100%;
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<select name="test2" class="test2">
<option value="SelectBoxIt is:">SelectBoxIt is:</option>
<option value="a jQuery Plugin">a jQuery Plugin</option>
<option value="a Select Box Replacement">a Select Box Replacement</option>
<option value="a Stateful UI Widget">a Stateful UI Widget</option>
</select>
Run Code Online (Sandbox Code Playgroud)