- Ready
- Shell
- Runner
- Machine
- Shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
muir@dotterel pastecode]$ cat target/failsafe-reports/TestSuite.txt | |
------------------------------------------------------------------------------- | |
Test set: TestSuite | |
------------------------------------------------------------------------------- | |
Tests run: 6, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 25.969 sec <<< FAILURE! | |
exactSearchTest(org.jboss.weld.examples.pastecode.test.selenium.PasteCodeTest) Time elapsed: 4.915 sec <<< FAILURE! | |
java.lang.AssertionError: A page should contain 'Posted by graham ...' expected:<true> but was:<false> | |
at org.testng.Assert.fail(Assert.java:89) | |
at org.testng.Assert.failNotEquals(Assert.java:443) | |
at org.testng.Assert.assertTrue(Assert.java:37) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressWarnings("unchecked") | |
@Produces @Named @RequestScoped | |
public List<User> getUsers() | |
{ | |
return userDatabase.createQuery("select u from User u").getResultList(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<faces-config id="seam3" version="2.0" | |
xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xi="http://www.w3.org/2001/XInclude" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"> | |
<name>seam3</name> | |
<ordering> | |
<after> | |
<name>weld</name> | |
<others/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The context in which instance injection occurs. | |
* | |
* @author Pete Muir | |
* | |
*/ | |
public interface InjectionContext<T> | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(Arquillian.class) | |
public class KSessionTest | |
{ | |
@Deployment | |
public static JavaArchive createTestArchive() | |
{ | |
String pkgPath = KSessionTest.class.getPackage().getName().replaceAll("\\.", "/"); | |
JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class) | |
.addPackages(true, new DroolsModuleFilter("ksession"), KnowledgeBaseProducer.class.getPackage()) | |
.addClass(KSessionTestRules.class) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Drools(kbuilderConfigFile = "kbuilderconfig.properties", | |
kbaseConfigFile = "kbaseconfig.properties", | |
}) | |
@Produces | |
@ApplicationScoped | |
RuleResouces configureRules() { | |
// Here the RuleResource guesses at being a DRL based on extension (not sure if this is valid) | |
// I also compressed the URL back to a normal syntax | |
return new RuleResources().add(new RuleResource("classpath:/kbasetest.drl", "forkbasetest")).add(...); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Produces | |
@SomeQualifier // The unique identifier for this generic configuration | |
public Dools setupDroolsConfig() | |
{ | |
//set up the configuration and return it. | |
//any producer that returns a Drools automatically installs a | |
//set of generic beans with the same qualifier | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void breakWeld(HttpRequestContext requestContext, @Basic RequestContext basicRequestContext) { | |
requestContext.invalidate(); // This would cause the store to be marked invalid | |
requestContext.deactivate(); // This would cause the context to be marked inactive, and if invalid, cause bean instances to be destroyed | |
basicRequestContext.activate(); // This would cause a new request context to start | |
// Now you have broken your app totally. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
* | |
* Copyright 2009 Sun Microsystems, Inc. All rights reserved. | |
* | |
* Use is subject to license terms. | |
* | |
* JBoss, Home of Professional Open Source | |
* Copyright 2008, Red Hat, Inc., and individual contributors | |
* by the @authors tag. See the copyright.txt in the distribution for a |