INNER CODE UNIT · Go

TestRequestQueryBuilderStaysCompatible

prest/prest · adapters/compat_test.go:49

func TestRequestQueryBuilderStaysCompatible(t *testing.T) {
	t.Parallel()

	// Reaching this line at all means the assertion above compiled, which is
	// the whole point. Calling through the interface keeps the vars used and
	// documents that the method set is exercised, not just declared.
	var builder adapters.RequestQueryBuilder = legacyQueryBuilder{}
	joins, err := builder.JoinByRequest(&http.Request{})
	if err != nil || joins != nil {
		t.Fatalf("frozen stub should be inert, got %v / %v", joins, err)
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…