@@ -0,0 +1,2280 @@
+/**%0A * Licensed to Jasig under one or more contributor license%0A * agreements. See the NOTICE file distributed with this work%0A * for additional information regarding copyright ownership.%0A * Jasig licenses this file to you under the Apache License,%0A * Version 2.0 (the %22License%22); you may not use this file%0A * except in compliance with the License. You may obtain a%0A * 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,%0A * software distributed under the License is distributed on%0A * an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied. See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage org.jasig.schedassist.impl.reminder;%0A%0Aimport net.fortuna.ical4j.model.Date;%0Aimport net.fortuna.ical4j.model.component.VEvent;%0Aimport net.fortuna.ical4j.model.property.Location;%0A%0Aimport org.jasig.schedassist.model.CommonDateOperations;%0Aimport org.jasig.schedassist.model.InputFormatException;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/**%0A * @author Nicholas Blair%0A * @version $Id: DefaultReminderServiceImplTest.java $%0A */%0Apublic class DefaultReminderServiceImplTest %7B%0A%0A%09@Test%0A%09public void testCreateMessageBody() throws InputFormatException %7B%0A%09%09VEvent event = new VEvent(new Date(CommonDateOperations.parseDateTimePhrase(%2220110830-1200%22)), %0A%09%09%09%09new Date(CommonDateOperations.parseDateTimePhrase(%2220110830-1300%22)), %0A%09%09%09%09%22some summary%22);%0A%0A%09%09event.getProperties().add(new Location(%22somewhere%22));%0A%09%09%0A%09%09String messageBody = DefaultReminderServiceImpl.createMessageBody(event);%0A%09%09Assert.assertTrue(messageBody.contains(%22Title: some summary%22));%0A%09%09Assert.assertTrue(messageBody.contains(%22Location: somewhere%22));%0A%09%7D%0A%09%0A%09@Test%0A%09public void testCreateMessageBodyNoLocation() throws InputFormatException %7B%0A%09%09VEvent event = new VEvent(new Date(CommonDateOperations.parseDateTimePhrase(%2220110830-1200%22)), %0A%09%09%09%09new Date(CommonDateOperations.parseDateTimePhrase(%2220110830-1300%22)), %0A%09%09%09%09%22some summary%22);%0A%09%09%0A%09%09String messageBody = DefaultReminderServiceImpl.createMessageBody(event);%0A%09%09Assert.assertTrue(messageBody.contains(%22Title: some summary%22));%0A%09%09Assert.assertFalse(messageBody.contains(%22Location%22));%0A%09%7D%0A%7D%0A

add unit test for createMessageBody