Remove deprecated code

Closes gh-387
This commit is contained in:
Andy Wilkinson
2017-05-18 17:12:41 +02:00
parent 41d537d06a
commit 6986cb75a8
38 changed files with 88 additions and 2785 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -107,26 +107,6 @@ public class RestDocumentationGeneratorTests {
verifySnippetInvocation(defaultSnippet2, configuration);
}
@Test
@Deprecated
public void additionalSnippetsAreCalled() throws IOException {
given(this.requestConverter.convert(this.request))
.willReturn(this.operationRequest);
given(this.responseConverter.convert(this.response))
.willReturn(this.operationResponse);
Snippet additionalSnippet1 = mock(Snippet.class);
Snippet additionalSnippet2 = mock(Snippet.class);
RestDocumentationGenerator<Object, Object> generator = new RestDocumentationGenerator<>(
"id", this.requestConverter, this.responseConverter, this.snippet);
generator.addSnippets(additionalSnippet1, additionalSnippet2);
HashMap<String, Object> configuration = new HashMap<>();
generator.handle(this.request, this.response, configuration);
generator.handle(this.request, this.response, configuration);
verifySnippetInvocation(this.snippet, configuration, 2);
verifySnippetInvocation(additionalSnippet1, configuration);
verifySnippetInvocation(additionalSnippet2, configuration);
}
@Test
public void newGeneratorOnlyCallsItsSnippets() throws IOException {
OperationRequestPreprocessor requestPreprocessor = mock(