场景3:使用jMock和RMock 模拟带有非默认构造函数的具体类
Scenario 3: Use jMock and RMock to mock a concrete class with a nondefault constructor
如果某人触法源于异常的神经构造使人别无选择,那么这人就不该受罚,这种观点有争议,却非新鲜事。
The idea that someone should not be punished if their abnormal neural make-up leaves them no choice but to break the law is contentious but not new.
例如,表示非空容器的任何类在构造函数中必然使用表示其元素的参数。
For instance, any class representing a non-empty container would naturally take arguments representing its elements in the constructor.
如果以非wsdl模式创建服务器,我们必须指定服务器uri;在清单3中,这是在作为第二个参数传递给构造函数的选项数组中指定的。
When setting up the server in non-WSDL mode, it is mandatory to specify the server URI; in Listing 3, this is specified in the options array passed to the constructor as the second argument.
XAML 2009将完全支持泛型、非默认构造方法、工厂方法、内建类型并且可以定义新的属性。
In XAML 2009 we see full support for generics, non-default constructors, factory methods, built-in types, and defining new properties.
RPD操作符中的远程访问计划是由包装器构造的,其中包含为调用来自非关系数据源的远程请求所需的规范。
The remote access plan contained in the RPD operator is constructed by the wrapper and contains the necessary specification to invoke the remote request from the non-relational data source.
通常这些稳定的类型规则被放在非默认的构造器(Constructor)和只有Getter的属性(Property)里。
The usually rules for immutable types were put into place such as no default constructors and only getters for properties.
清单3传递一个null值到对象构造函数的第一个参数,以非wsdl模式初始化了一个新的Zend_Soap_Server对象。
Listing 3 initializes a new Zend_Soap_Server object in non-WSDL mode, passing a null value as the first argument to the object constructor.
鉴于无序写入和引用在构造函数执行前变成非null的问题,您可能会考虑string类。
You might wonder about the String class given the issue of out-of-order writes and a reference becoming non-null prior to the constructor executing. Consider the following code.
样式表中的非xslt构造。
线程1然后开始执行 //4 处的代码,同时使inst为非 null,但在Singleton 的构造函数执行前。
Thread 1 then begins to execute the code at //4, making inst non-null but before the constructor for Singleton executes.
这行代码的问题是:在Singleton构造函数体执行之前,变量instance可能成为非null的。
The problem with this line of code is that the variable instance can become non-null before the body of the Singleton constructor executes.
四川盆地下二叠统中次生白云岩及古岩溶是下二叠统主要的非构造圈闭储层之一。
The secondary dolomite and paleokarst of the Lower Permian Series in Sichuan basin is one of the important atectonic reserviors in the basin.
介绍了几种较为成熟的混凝土损伤模型,在传统非局部损伤模型的基础之上引入了光滑权函数构造了一种新型的非局部损伤模型。
This paper introduces several kind of the damage model of concrete and presents a new kind of non-local damage model by adding the smooth weight function on the classical non-local damage model.
牢固、安康的资本构造非企业生亡和连续收铺的后降后降,也非脆持市场合做力的基本。
The firmness, healthy capital structure is the prior condition of the business enterprise existing and developing, is also the foundation that keeps the market competition ability.
在作业加工时间简单线性恶化下,提出作业的非负开始和停止延迟恶化率,构造了满足约束条件的复合作业。
Under the simple linear deteriorating, nonnegative start and stop lag deteriorating rates are introduced so as to combine jobs and construct composite jobs satisfying precedence relations.
还利用构造对压力产生特殊影响,分析了沉积的非连续性等。
Using the special influence of the structure on the pressure, depositional uncontinuity is analyzed.
再将差价合约引入模型中,构造发电公司的非合作动态竞价博弈模型。
Then introduce the Vesting Contract into the model, and constructs the dynamic bidding model of Power Generation Company.
将这种方法应用到具体的非晶相绝缘体中,以材料的实际结构来构造双势垒模型,得到的结果与实验相吻合。
When it is applied to amorphous insulating materials with double well potential model being constructed based on real structure, simulation results are in accord with experiments.
在有限维希尔伯特空间中构造了非简谐振子的广义相干态,并研究了其量子统计特性。
Generalized coherent states of a non harmonic oscillator in a finite dimensional Hilbert space are constructed and some quantum statistical properties are studied.
深入阐述“绿色凝灰岩区”和“非绿色凝灰岩区”的区域构造演化特征以及与成矿的关系。
The regional tectonic evolution characteristics of "green tuff region" and "Non green tuff region" and their relationship with uranium mineralization are elaborated in depth.
依据构造样式和圈闭特征,将辽河盆地的圈闭划分为构造圈闭和非构造圈闭两大类。
Based on the structural styles and trap characteristics, the traps in Liaohe basin are classified into structural trap and non-structural trap.
利用永磁铁间同极相斥的特性,构造了用于汽车减振系统的一种非接触、非线性的磁力弹簧。
Using the character of permanent magnetic iron, the magnetic spring was constructed with the character of non-connection and non-linear.
采用光强的互补编码,利用体全息关联特性,构造了一种内容寻址的、基于与非操作的光学全息真值表查询系统。
Adopting complementary-encoding of light intensity and volume holography, a content-addressable optical holography truth table look-up system based on the NAND operation is structured.
通过进行具体分析,提出与传统背包体制完全不同的构造思路,使用非超递增序列构造背包体制。
Though those concrete analysis, it is proposed a new method to construct knapsack scheme, which is use non-super-increasing sequence in this paper.
采用泰勒展式系数匹配的方法构造出了非等距网格系统的紧致差分格式,并分析了其截断误差。
Compact finite difference scheme (CFDS) based on non-uniform meshes is constructed by matching the Taylor series coefficient expansion, and its truncation errors are analyzed.
采用了近似下三角校验阵的形式,构造了一类具有不等错误保护的非规则ldpc码。
This paper constructs irregular LDPC codes of unequal error protection with a parity check matrix in a lower triangular.
隧洞不良地质段包括断层、低强度的软弱夹层、地质构造发育的结构松散地层、非岩性粘土、高地应力地层和富水地层等。
The tunnel adverse geological faults include faultage, low strength, geological formation and development of loose, non-rock clay, high stress formation and water-rich strata.
隧洞不良地质段包括断层、低强度的软弱夹层、地质构造发育的结构松散地层、非岩性粘土、高地应力地层和富水地层等。
The tunnel adverse geological faults include faultage, low strength, geological formation and development of loose, non-rock clay, high stress formation and water-rich strata.
应用推荐