Skip to content

workhorsy/BDD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BDD

Behavior Driven Development testing framework for the D programming language

Documentation

https://workhorsy.github.io/BDD/3.1.0/

Example

import std.stdio : stdout;


int add(int a, int b) {
	return a + b;
}

unittest {
	import BDD;

	describe("math#add",
		before(delegate() {
			stdout.writeln("Before called ...");
		}),
		after(delegate() {
			stdout.writeln("After called ...");
		}),
		it("Should add positive numbers", delegate() {
			add(5, 7).shouldEqual(12);
		}),
		it("Should add negative numbers", delegate() {
			add(5, -7).shouldEqual(-2);
		})
	);
}

Generate documentation

dub --build=docs

Run unit tests

dub test

Dub version Dub downloads License

About

Behavior Driven Development testing framework for the D programming language

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published