[Training Video - 4] [Groovy] Object equality and variable equality check
def x=2
def y=3 if(x == y){
log.info "equal"
}else{
log.info "not equal" // print out not equal
} TestService s1 = new TestService()
TestService s2 = new TestService()
log.info s1.is(s2) // false
s1=s2
log.info s1.is(s2) // true class TestService{ }
Run result:
Tue Oct 06 21:04:38 CST 2015:INFO:not equal
Tue Oct 06 21:04:38 CST 2015:INFO:false
Tue Oct 06 21:04:38 CST 2015:INFO:true
[Training Video - 4] [Groovy] Object equality and variable equality check的更多相关文章
- [Training Video - 3] [Groovy in Detail] Non-static and Static variables, objects and object referances
log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() ...
- [Training Video - 2] [Groovy Introduction]
Building test suites, Test cases and Test steps in SOAP UI Levels : test step level test case level ...
- [Training Video - 4] [Groovy] Optional parameter in groovy
Employee.log=log Employee e1 = new Employee() log.info e1.add(1,2,3,4) // optional parameters in gro ...
- [Training Video - 3] [Groovy in Detail] Non-static and Static functions, initializing log inside class
log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] Exception Handling in groovy
def x = new String[3] x[0] = "A" x[1] = "B" x[2] = "C" log.info"X ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] HashSet and Hashtable
Hashset: HashSet set = new HashSet() set.add("India") set.add("USA") set.add(&qu ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] Array and ArrayList
Array: def x = new String[5] x[0] = "India" x[1] = "USA" x[2] = "Korea" ...
- [Training Video - 4] [Groovy] String Functions
def x="I like to read books before bed" def temp = x.split(" ") log.info "S ...
- [Training Video - 4] [Groovy] Initializing log inside class with constructor
TestService s = new TestService(log,context,testRunner) s.xyz() class TestService{ def log def conte ...
随机推荐
- python 多线程要点
要点整理 多线程 #coding=utf-8 import threading from time import ctime,sleep def music(func): for i in range ...
- 使用BeanShell 对比取出来的值
描述: 使用BeanShell 对比取出来的值,如不一致,报错 步骤一: 使用json Extractor后置处理器,取出"登入成功" 使用BeanS hell断言: 语法: if ...
- [转]Oracle 连接dll
https://www.nuget.org/packages/Oracle.ManagedDataAccess
- PAT甲级目录
树(23) 备注 1004 Counting Leaves 1020 Tree Traversals 1043 Is It a Binary Search Tree 判断BST,BST的性质 ...
- 1102 Invert a Binary Tree
题意:给定一个二叉树,要求输出翻转后的二叉树的层序序列和中序序列. 思路:不用真的翻转,只需要在输出时先访问右结点再访问左结点即可. 代码: #include <cstdio> #incl ...
- 堆、栈、free
转自:http://codeup.org/archives/212 http://bbs.bccn.net/thread-82212-1-1.html http://www.cppblog.com/o ...
- python写个Hack Scan
前言: 之前逛SAFEING极客社区的时候 发现一款黑市卖2000多的软件,后面下载了 打不开.发现config文件里面有些不错的东西.总结了一下 有了以下的脚本. 脚本用处: [1]探测CMS(不敢 ...
- Pathway富集分析气泡图
data.tsv > pathway = read.table("data.tsv",header = T, sep="\t") > library ...
- Dev使用技巧汇总
C# XtraGrid的行指示器(RowIndicator)行号以及图标设置 参考网址:https://www.cnblogs.com/xuliangxing/p/6775438.html DateE ...
- leetcode168
public class Solution { private string Convert(int k) { var s = ""; switch (k) { : s = &qu ...