Code Monkey home page Code Monkey logo

mockito-remote's Introduction

Mockito Remote

Stub and verify invocations for Mockito mocks in a remote application.

Usage

  • Build the mockito-remote.jar and include it in your application and test classpath.
  • On the remote application side create a RemoteMockitoServer and register some mocks.
  • On the test side create a RemoteMockitoClient and register some mocks.
  • On the test side use the static given() and verify() methods from BDDRemoteMockito in the same way you would with regular Mockito.
  • Any mocks registered with the RemoteMockitoClient and RemoteMockitoServer will be automatically synchronised.

HTTP access to RemoteMockitoServer

RemoteMockitoServer has a REST like interface that can be accessed by a web browser or curl pointed to http://server:port/com.fully.qualified.ClassName.

You can see the current list of invocations on a mock using GET, upload some new stubbings using POST, and reset the remote invocations using DELETE.

Examples

I have included a basic example as part of the test source that shows remote stubbing and verification.

SomeRemoteApp

RemoteMockitoIT

mockito-remote's People

Watchers

James Cloos avatar 克柔 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.