예제 #1
0
func (t *TestSuite) TestMD5Stringer_MarshalJSON(c *C) {
	var b []byte
	var err error
	var e minfraud.MD5Stringer = "These pretzels are making me thirsty."

	b, err = e.MarshalJSON()
	c.Assert(err, IsNil)
	c.Check(string(b), Equals, `"b0804ec967f48520697662a204f5fe72"`)
}
예제 #2
0
func (t *TestSuite) TestMD5Stringer_MD5(c *C) {
	var e minfraud.MD5Stringer = "These pretzels are making me thirsty."
	c.Check(e.MD5(), Equals, "b0804ec967f48520697662a204f5fe72")
}
예제 #3
0
func (t *TestSuite) TestMD5Stringer_String(c *C) {
	var e minfraud.MD5Stringer = "TestWord"
	c.Check(e.String(), Equals, "TestWord")
}