gocheckers

package module
v0.0.0-...-77e0147 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

README

Go Checkers

These are additional gocheck Checker implementations that can be used in addition to the ones provided by gocheck.

Current state: deprecated

Only used by v1 go services, which are currently being made deprecated. We don't think this brings enough value to keep around.

Installation

$ go get gopkg.in/check.v1
$ go get -u "github.com/CrowdSurge/gocheckers"

Basic Example

package main

import (
	"testing"    

	chk "github.com/CrowdSurge/gocheckers"
	. "launchpad.net/gocheck"
)

func Test(t *testing.T) { TestingT(t) }

type TestSuite struct{}

var _ = Suite(&TestSuite{})

func (suite *TestSuite) TestGetTemplatesSuccessfully(c *C) {
    templates, err := GetTemplates("Testing")
	c.Assert(err, IsNil)
	c.Check(len(templates), chk.GreaterThan, 0)
}

Documentation

Overview

Package gocheckeres contains additional Checker implementations.

Index

Constants

This section is empty.

Variables

View Source
var GreaterThan gocheck.Checker = &greaterThanChecker{
	&gocheck.CheckerInfo{Name: "GreaterThan", Params: []string{"obtained", "n"}},
}

The GreaterThan checker verifies that the obtained value is strictly greater than provided length.

For example:

c.Assert(len(list), GreaterThan, 5)
View Source
var LessThan gocheck.Checker = &lessThanChecker{
	&gocheck.CheckerInfo{Name: "LessThan", Params: []string{"obtained", "n"}},
}

The LessThan checker verifies that the obtained value is strictly less than provided value.

For example:

c.Check(len(list), LessThan, 5)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL