1 package org.codehaus.redback.rest.services.mock;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import javax.inject.Inject;
22 import javax.mail.internet.MimeMessage;
23 import javax.ws.rs.Path;
24 import java.util.ArrayList;
25 import java.util.List;
28 * a rest which contains some methods to do some assert
30 * @author Olivier Lamy
32 public class DefaultServicesAssert
33 implements ServicesAssert
37 MockJavaMailSender mockJavaMailSender;
39 public List<EmailMessage> getEmailMessageSended()
42 List<EmailMessage> emailMessages = new ArrayList<EmailMessage>();
43 for ( MimeMessage mimeMessage : mockJavaMailSender.getSendedEmails() )
45 emailMessages.add( new EmailMessage( mimeMessage ) );