PageRenderTime 57ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/clojure/src/test/java/org/switchyard/component/clojure/deploy/ClojureActivatorTest.java

https://github.com/Salaboy/components
Java | 55 lines | 22 code | 7 blank | 26 comment | 0 complexity | f7e8ddeb8e8c0eb2cdb0111fa7a71197 MD5 | raw file
  1. /*
  2. * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
  3. * LLC, and individual contributors by the @authors tag. See the copyright.txt
  4. * in the distribution for a full listing of individual contributors.
  5. *
  6. * This is free software; you can redistribute it and/or modify it under the
  7. * terms of the GNU Lesser General Public License as published by the Free
  8. * Software Foundation; either version 2.1 of the License, or (at your option)
  9. * any later version.
  10. *
  11. * This software is distributed in the hope that it will be useful, but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  14. * details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this software; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
  19. * site: http://www.fsf.org.
  20. */
  21. package org.switchyard.component.clojure.deploy;
  22. import static org.hamcrest.CoreMatchers.equalTo;
  23. import static org.hamcrest.CoreMatchers.is;
  24. import static org.hamcrest.MatcherAssert.assertThat;
  25. import org.junit.Test;
  26. import org.junit.runner.RunWith;
  27. import org.switchyard.test.Invoker;
  28. import org.switchyard.test.ServiceOperation;
  29. import org.switchyard.test.SwitchYardRunner;
  30. import org.switchyard.test.SwitchYardTestCaseConfig;
  31. import org.switchyard.test.mixins.CDIMixIn;
  32. /**
  33. * Functional test for ClojureActivator.
  34. *
  35. * @author Daniel Bevenius
  36. *
  37. */
  38. @RunWith(SwitchYardRunner.class)
  39. @SwitchYardTestCaseConfig(config = "switchyard-clojure.xml", mixins = CDIMixIn.class)
  40. public class ClojureActivatorTest {
  41. @ServiceOperation("OrderService.getTitleForItem")
  42. private Invoker _getTitleForItem;
  43. @Test
  44. public void activtor() {
  45. final String title = _getTitleForItem.sendInOut(10).getContent(String.class);
  46. assertThat(title, is(equalTo("Fletch")));
  47. }
  48. }