hs-test: use assert-like approach in test cases
Type: test Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech> Change-Id: I1653001461d4dfc52f1fb3a9e0cf458a506b8324
This commit is contained in:

committed by
Florin Coras

parent
fe1fb3c31a
commit
98a91e8260
@ -45,6 +45,18 @@ func (s *HstSuite) assertEqual(expected, actual interface{}, msgAndArgs ...inter
|
||||
}
|
||||
}
|
||||
|
||||
func (s *HstSuite) assertNotEqual(expected, actual interface{}, msgAndArgs ...interface{}) {
|
||||
if !assert.NotEqual(s.T(), expected, actual, msgAndArgs...) {
|
||||
s.hstFail()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *HstSuite) assertContains(testString, contains interface{}, msgAndArgs ...interface{}) {
|
||||
if !assert.Contains(s.T(), testString, contains, msgAndArgs...) {
|
||||
s.hstFail()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *HstSuite) assertNotContains(testString, contains interface{}, msgAndArgs ...interface{}) {
|
||||
if !assert.NotContains(s.T(), testString, contains, msgAndArgs...) {
|
||||
s.hstFail()
|
||||
|
Reference in New Issue
Block a user