Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 879352 Details for
Bug 1072629
Behavioral bug in decision table
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
jUnit reproducer with plain DRL
DateExtendingFactTest.java (text/x-java), 1.50 KB, created by
Marek Winkler
on 2014-03-27 08:27:46 UTC
(
hide
)
Description:
jUnit reproducer with plain DRL
Filename:
MIME Type:
Creator:
Marek Winkler
Created:
2014-03-27 08:27:46 UTC
Size:
1.50 KB
patch
obsolete
>package org.jboss.qa.brms.bre.regression; > >import java.io.StringReader; >import java.util.Date; > >import org.junit.Test; >import org.kie.api.KieServices; >import org.kie.api.io.KieResources; >import org.kie.api.io.Resource; >import org.kie.internal.utils.KieHelper; > >/** > * Tests compilation of facts extending java.util.Date (BZ 1072629). > */ >public class DateExtendingFactTest { > > private static final String FACT_CLASS_NAME = MyDate.class.getCanonicalName(); > > private static final String DRL = "package org.test \n" > + "rule 'sample rule' \n" > + "when \n" + " $date:" + FACT_CLASS_NAME + "() \n" > + "then \n" + "$date.setDescription(\"test\"); \n" + "end \n"; > > /** > * Tests compiling DRL with a fact extending java.util.Date. > */ > @Test > public void testDateExtendingFact() { > final KieResources resources = KieServices.Factory.get().getResources(); > final Resource drlResource = resources.newReaderResource(new StringReader(DRL)); > drlResource.setSourcePath("src/main/resources/test.drl"); > new KieHelper().addResource(drlResource).build(); > } > > /** > * Sample fact extending java.util.Date. > */ > public static class MyDate extends Date { > > private String description; > > public MyDate() { > super(); > } > > public String getDescription() { > return this.description; > } > > public void setDescription(final String desc) { > this.description = desc; > } > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1072629
:
870704
|
870705
|
879120
| 879352 |
879389