Coder Social home page Coder Social logo

doublefx / mockolate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drewbourne/mockolate

0.0 2.0 0.0 11.67 MB

fake chocolate, mock objects and test spies for AS3

Home Page: http://mockolate.org/

License: MIT License

XSLT 0.08% ActionScript 99.92%

mockolate's Introduction

Mockolate.

fake chocolate, mock objects and test spies.

mockolate.org Documentation, examples, elaboration. Drew Bourne Contact.

This tagline is probably a hint that Mockolate is most useful when testing software. Whether you are doing test-driven-development, post-crunch-time fill-in-the-gaps, or exploratory-I-have-no-idea-what-is-going-on testing Mockolate can help.

Mock Objects

A mock object can be used to simulate the behaviour of complex, real (non-mock) objects when using the real object would be impractical or impossible. Situations where a mock object would be useful:

  • When an object is slow (like a database or webservice),
  • is non-deterministic (like the current time),
  • has states that are difficult to reproduce (like network connections)

The above is mostly appropriated from Mock Objects at Wikipedia. I could keep rewriting it here, but it's really quite a good read.

Test Spies

In espionage, spies infiltrate a system, recording and relaying information to their handlers. The handlers may use that information to check facts, inform others, or take action.

In testing, a Test Spy records which methods are called, which getters are got, which setters are set. The handler (typically a testcase) can then check the facts against what should or should not have happened and take action (typically an assertion).

Mockolate?

  • clean consistent syntax
  • expectation-based or record-replay
  • dynamically generates proxy Classes
  • supports handcoded proxy Classes
  • provides a FlexUnit 4 Rule and Runner
  • uses proven libraries, FlexUnit 4, FLoxy and Hamcrest-as3

Next

Head over to http://mockolate.org/ for documentation and examples:

Thanks

Richard Szalay with FLoxy, and Maxim Porges with Loom for their work on Class proxy generation.

Brian LeGros for hassling me about -mock-as3- enough that I added class proxy generation to it. Except you can ignore that project in favour of Mockolate.

mockolate's People

Contributors

drewbourne avatar blegros avatar fhd avatar

Watchers

Frédéric THOMAS 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.