|
Groovy example source code file (Groovy3720Bug.groovy)
The Groovy Groovy3720Bug.groovy source codepackage groovy.bugs import groovy.mock.interceptor.* class Groovy3720Bug extends GroovyTestCase { void testCreateStubNode() { def stubNodeContext1 = new StubFor(AnotherNode3720) assertNotNull stubNodeContext1.proxyInstance() def stubNodeContext2 = new StubFor(MyNode3720) assertNotNull stubNodeContext2.proxyInstance() } void testCreateStubNodeDelegate() { def stubNodeContext1 = new StubFor(AnotherNode3720) assertNotNull stubNodeContext1.proxyDelegateInstance() def stubNodeContext2 = new StubFor(MyNode3720) assertNotNull stubNodeContext2.proxyDelegateInstance() } void testCreateMockNode() { def mockNodeContext1 = new MockFor(AnotherNode3720) assertNotNull mockNodeContext1.proxyInstance() def mockNodeContext2 = new MockFor(MyNode3720) assertNotNull mockNodeContext2.proxyInstance() } void testCreateMockNodeDelegate() { def mockNodeContext1 = new MockFor(AnotherNode3720) assertNotNull mockNodeContext1.proxyDelegateInstance() def mockNodeContext2 = new MockFor(MyNode3720) assertNotNull mockNodeContext2.proxyDelegateInstance() } } abstract class MyNode3720 {} abstract class BaseNode3720 { abstract m1() } abstract class AnotherNode3720 extends BaseNode3720 { abstract m2() } Other Groovy examples (source code examples)Here is a short list of links related to this Groovy Groovy3720Bug.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.