@@ -0,0 +1,1923 @@
+/*%0A * Copyright 2006-2008 Web Cohesion%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.codehaus.enunciate.contract.jaxws;%0A%0Aimport junit.framework.TestCase;%0Aimport net.sf.jelly.apt.decorations.JavaDoc;%0A%0A/**%0A * @author Ryan Heaton%0A */%0Apublic class TestThrowsComments extends TestCase %7B%0A%0A  public void testThrowsOnNewLine() throws Exception %7B%0A    JavaDoc jd = new JavaDoc(%22Reads a set of persons from the database.  Intended as an example of%5Cn%22 +%0A                  %22collections as SOAP parameters.%5Cn%22 +%0A                  %22@param personIds The ids of the persons to read.%5Cn%22 +%0A                  %22@return The persons that were read.%5Cn%22 +%0A                  %22@throws ServiceException%5Cn%22 +%0A                  %22If the read of one or more of the people failed.%22);%0A    String throwsDoc = jd.get(%22throws%22).toString();%0A    assertEquals(%22ServiceException%5Cn%22 +%0A      %22If the read of one or more of the people failed.%22, throwsDoc);%0A%0A    int spaceIndex = throwsDoc.indexOf(' ');%0A    if (spaceIndex == -1) %7B%0A      spaceIndex = throwsDoc.length();%0A    %7D%0A%0A    String exception = throwsDoc.substring(0, spaceIndex);%0A    String throwsComment = %22%22;%0A    if ((spaceIndex + 1) %3C throwsDoc.length()) %7B%0A      throwsComment = throwsDoc.substring(spaceIndex + 1);%0A    %7D%0A%0A    //todo: see https://jira.codehaus.org/browse/ENUNCIATE-751%0A    //assertEquals(%22If the read of one or more of the people failed.%22, throwsComment);%0A%0A  %7D%0A%0A%7D%0A

test for ENUNCIATE-751