项目作者: cTwospoons

项目描述 :
A simple project to show how to use Spock to unit test Camel routes.
高级语言: Groovy
项目地址: git://github.com/cTwospoons/camel-spock-test.git
创建时间: 2017-08-19T16:05:02Z
项目社区:https://github.com/cTwospoons/camel-spock-test

开源协议:

下载


Camel Spock Testing

A simple project showing how to use Spock to unit test camel routes.

Introduction

Apache Camel is a popular integration framework with documentation and source code available with instructions on it’s use and various components.

This project uses Spock to explore a simple way to unit test routing logic avoiding the need for a full-fledged integration context.

Requirements

  • Apache Camel
  • Spring Boot
  • Spock
  • Groovy

Running the App

Running locally

  1. ./gradlew bootRun

Running the tests

  1. ./gradlew test

Sending messages along the Camel routes

The app starts a basic Spring context with Spring Boot putting a request listener on the default port.

To send a message along the Camel routes when the app is running, issue a simple GET request to

  1. curl http://localhost:8080/simple