Removal of internal Contains methods (#462)

Removal of internal  `contains`methods
This commit is contained in:
Danny 2022-08-02 12:49:21 -04:00 committed by GitHub
parent 3eaebaed8f
commit a1b8868600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,15 +12,6 @@ type ExchangeDataCollectionSuite struct {
suite.Suite suite.Suite
} }
func contains(elems []string, value string) bool {
for _, s := range elems {
if value == s {
return true
}
}
return false
}
func TestExchangeDataCollectionSuite(t *testing.T) { func TestExchangeDataCollectionSuite(t *testing.T) {
suite.Run(t, new(ExchangeDataCollectionSuite)) suite.Run(t, new(ExchangeDataCollectionSuite))
} }
@ -64,9 +55,9 @@ func (suite *ExchangeDataCollectionSuite) TestExchangeDataCollection_NewExchange
fullPath: []string{"Directory", "File", "task"}, fullPath: []string{"Directory", "File", "task"},
} }
suite.Equal(name, edc.user) suite.Equal(name, edc.user)
suite.True(contains(edc.FullPath(), "Directory")) suite.Contains(edc.FullPath(), "Directory")
suite.True(contains(edc.FullPath(), "File")) suite.Contains(edc.FullPath(), "File")
suite.True(contains(edc.FullPath(), "task")) suite.Contains(edc.FullPath(), "task")
} }
func (suite *ExchangeDataCollectionSuite) TestExchangeCollection_AddJob() { func (suite *ExchangeDataCollectionSuite) TestExchangeCollection_AddJob() {