Giter VIP home page Giter VIP logo

n26godog's Introduction

Cucumber N26 API for Golang

GitHub Releases Build Status codecov Go Report Card GoDevDoc Donate

n26godog provides cucumber/godog steps for testing N26 API.

Prerequisites

  • Go >= 1.17

Install

go get github.com/nhatthm/n26godog

Usage

For example:

package mypackage

import (
    "testing"

    "github.com/cucumber/godog"
    "github.com/nhatthm/n26godog"
)

func TestIntegration(t *testing.T) {
    server := n26godog.New(t)
    suite := godog.TestSuite{
        Name:                 "Integration",
        TestSuiteInitializer: nil,
        ScenarioInitializer: func(ctx *godog.ScenarioContext) {
            server.RegisterContext(ctx)
        },
        Options: &godog.Options{
            Strict:    true,
            Output:    out,
            Randomize: rand.Int63(),
        },
    }

    // Initiate your client and run it with the suite.
    status := suite.Run()
}

Steps

Authentication

  • ^n26 receives a login request with username "([^"]+)", password "([^"]+)" and device id "([^"]+)" but the credentials is wrong
  • ^n26 receives a login request with username "([^"]+)", password "([^"]+)" and device id "([^"]+)" but no one confirms login
  • ^n26 receives a success login request with username "([^"]+)", password "([^"]+)" and device id "([^"]+)"
  • ^n26 receives a refresh token request but the token is invalid
  • ^n26 receives a success refresh token request

Transactions

  • ^n26 receives a request to find all transactions in between "([^"]+)" and "([^"]+)"(?: with page size ([0-9]+))? and responses:$
  • ^n26 receives a request to find all transactions in between "([^"]+)" and "([^"]+)"(?: with page size ([0-9]+))? and responses with result from file:$

Examples

See https://github.com/nhatthm/n26godog/tree/master/features

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

Paypal donation

paypal

       or scan this

n26godog's People

Watchers

 avatar  avatar  avatar

Forkers

dluong777

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.