GithubHelp home page GithubHelp logo

arif-hanif / squadron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swisslife-oss/squadron

0.0 1.0 0.0 1.6 MB

A testing framework for containerized and cloud services

Home Page: https://swisslife-oss.github.io/squadron/

License: MIT License

C# 99.57% TSQL 0.43%

squadron's Introduction

Snapshooter

Nuget GitHub Release Build status Coverage Status Quality

Squadron is a testing framework for containerized and cloud services.

Squadron is a helpful framework which enables you to write tests against dependent services without any overhead. Squadron can provide you isolation in tests through Container Providers or support for all other services through Cloud Providers.

To get more detailed information about Squadron, go to the Squadron Docs

Features

Container Providers

Cloud Providers

Getting Started

As getting started we've prepared a simple example how to use Squadron with MongoDB.

You can find samples with quick starts here.

Install

Install the Squadron nuget package for MongoDB within your test project:

dotnet add package Squadron.Mongo

Access

Inject the MongoResource into your test class constructor:

public class AccountRepositoryTests
    : IClassFixture<MongoResource>
{
    private readonly MongoResource _mongoResource;

    public AccountRepositoryTests(
        MongoResource mongoResource)
    {
        _mongoResource = mongoResource;
    }
}

Use

Use MongoResources to create a database and initialize your repository:

[Fact]
public void CreateAccount_AccountExists()
{
    // arrange
    var database = _mongoResource.CreateDatabase();
    var accountRepository = new AccountRepository(database);
    var account = new Account();

    // act
    var addedAccount = accountRepository.Add(account);

    // assert
    Snapshot.Match(addedAccount);
}

Community

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the Swiss Life OSS Code of Conduct.

squadron's People

Contributors

glucaci avatar carael avatar lpzimmermann avatar arif-hanif avatar christosmonogios avatar rohrerf avatar wangor avatar michaelstaib avatar pascalsenn avatar mlimongelli avatar

Watchers

James Cloos 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.