当前位置: 首页>>代码示例>>Java>>正文


Java Dependency类代码示例

本文整理汇总了Java中powermock.examples.mockpolicy.nontest.Dependency的典型用法代码示例。如果您正苦于以下问题:Java Dependency类的具体用法?Java Dependency怎么用?Java Dependency使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Dependency类属于powermock.examples.mockpolicy.nontest包,在下文中一共展示了Dependency类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: applyInterceptionPolicy

import powermock.examples.mockpolicy.nontest.Dependency; //导入依赖的package包/类
/**
 * Every time the {@link Dependency#getData()} method is invoked we return a
 * custom instance of a {@link DataObject}.
 */
@Override
public void applyInterceptionPolicy(MockPolicyInterceptionSettings settings) {
	final Method getDataMethod = Whitebox.getMethod(Dependency.class);
	final DataObject dataObject = new DataObject("Policy generated data object");
	settings.stubMethod(getDataMethod, dataObject);
}
 
开发者ID:powermock,项目名称:powermock-examples-maven,代码行数:11,代码来源:MyCustomMockPolicy.java

示例2: getDependencyData

import powermock.examples.mockpolicy.nontest.Dependency; //导入依赖的package包/类
public DataObject getDependencyData() {
	return new Dependency("some data").getData();
}
 
开发者ID:powermock,项目名称:powermock-examples-maven,代码行数:4,代码来源:DependencyUser.java

示例3: applyClassLoadingPolicy

import powermock.examples.mockpolicy.nontest.Dependency; //导入依赖的package包/类
/**
 * Add the {@link Dependency} to the list of classes that should be loaded
 * by the mock class-loader.
 */
@Override
public void applyClassLoadingPolicy(MockPolicyClassLoadingSettings settings) {
	settings.addFullyQualifiedNamesOfClassesToLoadByMockClassloader(Dependency.class.getName());
}
 
开发者ID:powermock,项目名称:powermock-examples-maven,代码行数:9,代码来源:MyCustomMockPolicy.java

示例4: applyInterceptionPolicy

import powermock.examples.mockpolicy.nontest.Dependency; //导入依赖的package包/类
/**
 * Every time the {@link Dependency#getData()} method is invoked we return a
 * custom instance of a {@link DataObject}.
 */
public void applyInterceptionPolicy(MockPolicyInterceptionSettings settings) {
	final Method getDataMethod = Whitebox.getMethod(Dependency.class);
	final DataObject dataObject = new DataObject("Policy generated data object");
	settings.stubMethod(getDataMethod, dataObject);
}
 
开发者ID:awenblue,项目名称:powermock,代码行数:10,代码来源:MyCustomMockPolicy.java

示例5: getDependencyData

import powermock.examples.mockpolicy.nontest.Dependency; //导入依赖的package包/类
public DataObject getDependencyData()
{
   return new Dependency("some data").getData();
}
 
开发者ID:royosherove,项目名称:javatdddemo,代码行数:5,代码来源:DependencyUser.java

示例6: applyClassLoadingPolicy

import powermock.examples.mockpolicy.nontest.Dependency; //导入依赖的package包/类
/**
 * Add the {@link Dependency} to the list of classes that should be loaded
 * by the mock class-loader.
 */
public void applyClassLoadingPolicy(MockPolicyClassLoadingSettings settings) {
	settings.addFullyQualifiedNamesOfClassesToLoadByMockClassloader(Dependency.class.getName());
}
 
开发者ID:awenblue,项目名称:powermock,代码行数:8,代码来源:MyCustomMockPolicy.java


注:本文中的powermock.examples.mockpolicy.nontest.Dependency类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。