All Projects → machine → Machine.specifications

machine / Machine.specifications

Licence: mit
Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.

Projects that are alternatives of or similar to Machine.specifications

Cmake Examples
Useful CMake Examples
Stars: ✭ 7,220 (+796.89%)
Mutual labels:  unit-testing
Deepstate
A unit test-like interface for fuzzing and symbolic execution
Stars: ✭ 603 (-25.09%)
Mutual labels:  unit-testing
Testthat
An R 📦 to make testing 😀
Stars: ✭ 719 (-10.68%)
Mutual labels:  unit-testing
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+588.07%)
Mutual labels:  unit-testing
Kotlin Coroutines Android Examples
Learn Kotlin Coroutines for Android by Examples. Learn how to use Kotlin Coroutines for Android App Development.
Stars: ✭ 572 (-28.94%)
Mutual labels:  unit-testing
Vstest
Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
Stars: ✭ 624 (-22.48%)
Mutual labels:  unit-testing
Expecto
A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Stars: ✭ 495 (-38.51%)
Mutual labels:  unit-testing
Short
URL shortening service written in Go and React
Stars: ✭ 777 (-3.48%)
Mutual labels:  unit-testing
Robolectric
Android Unit Testing Framework
Stars: ✭ 5,372 (+567.33%)
Mutual labels:  unit-testing
Cmockery
A lightweight library to simplify and generalize the process of writing unit tests for C applications.
Stars: ✭ 697 (-13.42%)
Mutual labels:  unit-testing
Jasmine Matchers
Write Beautiful Specs with Custom Matchers for Jest and Jasmine
Stars: ✭ 552 (-31.43%)
Mutual labels:  unit-testing
Otj Pg Embedded
Java embedded PostgreSQL component for testing
Stars: ✭ 559 (-30.56%)
Mutual labels:  unit-testing
Pgtap
PostgreSQL Unit Testing Suite
Stars: ✭ 631 (-21.61%)
Mutual labels:  unit-testing
Ut
UT: C++20 μ(micro)/Unit Testing Framework
Stars: ✭ 507 (-37.02%)
Mutual labels:  unit-testing
Chromedp
A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.
Stars: ✭ 7,057 (+776.65%)
Mutual labels:  unit-testing
Tasty
Modern and extensible testing framework for Haskell
Stars: ✭ 499 (-38.01%)
Mutual labels:  unit-testing
Php Censor
PHP Censor is an open source self-hosted continuous integration server for PHP projects.
Stars: ✭ 619 (-23.11%)
Mutual labels:  unit-testing
Quixote
CSS unit and integration testing
Stars: ✭ 788 (-2.11%)
Mutual labels:  unit-testing
Viewinspector
Runtime introspection and unit testing of SwiftUI views
Stars: ✭ 746 (-7.33%)
Mutual labels:  unit-testing
Ios Mvp Clean Architecture
Demo iOS application built to highlight MVP (Model View Presenter) and Clean Architecture concepts
Stars: ✭ 637 (-20.87%)
Mutual labels:  unit-testing

Machine.Specifications

Docs Nuget Discussions License

MSpec logo

MSpec is called a "context/specification" test framework because of the "grammar" that is used in describing and coding the tests or "specs". The grammar reads roughly like this

When the system is in such a state, and a certain action occurs, it should do such-and-such or be in some end state.

You should be able to see the components of the traditional Arrange-Act-Assert model in there. To support readability and remove as much "noise" as possible, MSpec eschews the traditional attribute-on-method model of test construction. Instead it uses custom delegates that you assign anonymous methods, and asks you to name them following a certain convention.

using Machine.Specifications;

[Subject("Authentication")]
class When_authenticating_an_admin_user
{
    static SecurityService subject;
    static UserToken user_token;

    Establish context = () => 
        subject = new SecurityService();

    Because of = () =>
        user_token = subject.Authenticate("username", "password");

    It should_indicate_the_users_role = () =>
        user_token.Role.ShouldEqual(Roles.Admin);

    It should_have_a_unique_session_id = () =>
        user_token.SessionId.ShouldNotBeNull();
}

Getting Started

  1. Create a .NET Framework or .NET Core library project.
  2. Install Nuget packages as follows:
Install-Package Machine.Specifications
  1. Install the test SDK and Visual Studio runner:
Install-Package Microsoft.NET.Test.SDK
Install-Package Machine.Specifications.Runner.VisualStudio
  1. Optionally, install the assert and mocking libraries:
Install-Package Machine.Specifications.Should
Install-Package Machine.Fakes

Documentation

For project documentation, please visit the wiki.

Training

A PluralSight course by @kevinkuebler is available here.

Get in touch

Discuss with us on Discussions, or raise an issue.

Discussions

Packages

Project Build NuGet
Machine.Specifications Build
Machine.Specifications.Reporting Build
Machine.Specifications.Runner.Console Build
Machine.Specifications.Runner.ReSharper Build
Machine.Specifications.Runner.Rider Build
Machine.Specifications.Runner.TDNet Build
Machine.Specifications.Runner.Utility Build
Machine.Specifications.Runner.VisualStudio Build
Machine.Specifications.Should Build
Machine.Fakes Build
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].