(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func TestConcurrentRouter_Remove(t *testing.T) { |
| 18 | router := NewConcurrentRouter(NewRouter(RouterConfig{})) |
| 19 | |
| 20 | _, err := router.Add(Route{ |
| 21 | Method: http.MethodGet, |
| 22 | Path: "/initial1", |
| 23 | Handler: handlerFunc, |
| 24 | }) |
| 25 | assert.NoError(t, err) |
| 26 | assert.Equal(t, len(router.Routes()), 1) |
| 27 | |
| 28 | err = router.Remove(http.MethodGet, "/initial1") |
| 29 | assert.NoError(t, err) |
| 30 | assert.Equal(t, len(router.Routes()), 0) |
| 31 | } |
| 32 | |
| 33 | func TestConcurrentRouter_ConcurrentReads(t *testing.T) { |
| 34 | router := NewConcurrentRouter(NewRouter(RouterConfig{})) |
nothing calls this directly
no test coverage detected
searching dependent graphs…