-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,800 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,57 @@ | ||
# Ersatz Server | ||
[![Download](https://api.bintray.com/packages/cjstehno/stehno/ersatz/images/download.svg)](https://bintray.com/cjstehno/stehno/ersatz/_latestVersion) | ||
[![Build Status](https://travis-ci.org/cjstehno/ersatz.svg?branch=master)](https://travis-ci.org/cjstehno/ersatz) | ||
[![Coverage Status](https://coveralls.io/repos/github/cjstehno/ersatz/badge.svg?branch=master)](https://coveralls.io/github/cjstehno/ersatz?branch=master) | ||
|
||
> _noun_ An artificial substance or article used to replace something natural or genuine; a substitute. | ||
## Quick Links | ||
|
||
A "mock" HTTP server library for testing HTTP/REST clients. | ||
* Site: http://stehno.com/ersatz | ||
* Project: https://github.com/cjstehno/ersatz | ||
* User Guide: https://github.com/cjstehno/ersatz/guide/html5 | ||
* Groovy Docs: https://github.com/cjstehno/ersatz/groovydoc | ||
|
||
## Introduction | ||
|
||
The Ersatz Server is a HTTP client testing tool, which allows for request/response expectations to be configured in a flexible manner. The expectations | ||
will respond in a configured manner to requests and allow testing with different responses and/or error conditions without having to write a lot of | ||
boiler-plate code. | ||
|
||
## Artifacts | ||
|
||
For Gradle: | ||
|
||
testCompile 'com.stehno.ersatz:ersatz:0.1.0' | ||
|
||
For Maven: | ||
|
||
<dependency> | ||
<group>com.stehno.ersatz</group> | ||
<artifact>ersatz</artifact> | ||
<version>0.1.0</version> | ||
</dependency> | ||
|
||
## Build Instructions | ||
|
||
Ersatz is build using Gradle with no custom build tasks: | ||
|
||
./gradlew clean build | ||
|
||
[![Build Status](https://travis-ci.org/cjstehno/ersatz.svg?branch=master)](https://travis-ci.org/cjstehno/ersatz) | ||
[![Coverage Status](https://coveralls.io/repos/github/cjstehno/ersatz/badge.svg?branch=master)](https://coveralls.io/github/cjstehno/ersatz?branch=master) | ||
|
||
## Features | ||
## License | ||
|
||
* Uses embedded Undertow to setup an HTTP server for unit testing HTTP client code | ||
* compatible with Java and Groovy (and JVM language) | ||
* compatible with JUnit and Spock testing frameworks | ||
* Supports chained builder, Java 8 functions, and a Groovy DSL | ||
``` | ||
Copyright (C) 2016 Christopher J. Stehno | ||
## Atrifacts | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
compile 'com.stehno.ersatz:ersats:<CURRENT_VERSION>' | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
> WARNING: This is very much a work in progress and not yet ready for general use. | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
``` |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Dec 06 14:29:46 CST 2016 | ||
#Wed Dec 07 06:26:31 CST 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-all.zip |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'org.ajoberstar:gradle-git:1.0.0' | ||
} | ||
} | ||
|
||
apply plugin: 'org.ajoberstar.github-pages' | ||
|
||
githubPages { | ||
repoUri = 'git@github.com:cjstehno/ersatz' | ||
pages { | ||
from(file('build/site')) { | ||
into '.' | ||
} | ||
} | ||
} |
Oops, something went wrong.