func TestRetry_Abort(t *testing.T) {
	expectedError := errors.New("boom")
	ma := MaxAttempts{Times: 3, WaitFor: 10 * time.Second}
	errList := How(ma.New()).This(func(controller ServiceController) error {
		controller.Abort()
		return expectedError
	})

	if errList == nil {
		t.Error("expected an error list")
	} else {
		if errList.Last() != expectedError {
			t.Errorf(`expected error: "%s" but got: "%s"`, expectedError.Error(), errList.Last().Error())
		}
	}
}
// TestMaxExponentialService_Abort_Attempts ensures that abort prevents calling the methods after abort is called
TestMaxExponentialService_Abort_Attempts ensures that abort prevents calling the methods after abort is called
// TestMaxExponentialService_Abort_Attempts ensures that abort prevents calling the methods after abort is called
func TestRetry_Abort(t *testing.T) {
	expectedError := errors.New("boom")
	ma := MaxAttempts{Times: 3, WaitFor: 10 * time.Second}
	errList := How(ma.New()).This(func(controller ServiceController) error {
		controller.Abort()
		return expectedError
	})
	if errList == nil {
		t.Error("expected an error list")
	} else {
		if errList.Last() != expectedError {
			t.Errorf(`expected error: "%s" but got: "%s"`, expectedError.Error(), errList.Last().Error())
		}
	}
}
func TestRetry_Abort ( t * testing . T ) { expectedError := errors . New ( " " ) ma := MaxAttempts { Times : 3 , WaitFor : 10 * time . Second } errList := How ( ma . New ( ) ) . This ( func ( controller ServiceController ) error { controller . Abort ( ) return expectedError } ) if errList == nil { t . Error ( " " ) } else { if errList . Last ( ) != expectedError { t . Errorf ( `expected error: "%s" but got: "%s"` , expectedError . Error ( ) , errList . Last ( ) . Error ( ) ) } } }
TestMaxExponentialService_Abort_Attempts ensures that abort prevents calling the methods after abort is called
TestMaxExponentialService_Abort_Attempts ensures that abort prevents calling the methods after abort is called