Revision: 470b9088f43b
Branch: default
Author: enricogiurin
Date: Sat May 25 17:49:36 2013
Log: issue-118 - moved dao tests from je-web to je-core
http://code.google.com/p/jugevents/source/detail?r=470b9088f43b&repo=version3
Added:
/jugevents/jugevents-core/src/main/java/org/jugevents/core/Conf.java
/jugevents/jugevents-core/src/main/java/org/jugevents/core/JugEventsDaos.java
/jugevents/jugevents-core/src/test/java/org/jugevents/core/JugEventsBaseTest.java
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/EventDaoTest.java
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/EventResourceDaoTest.java
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/JUGDaoTest.java
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/JuggerDaoTest.java
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/ParticipantDaoTest.java
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/SpeakerDaoTest.java
/jugevents/jugevents-core/src/test/resources/fixtures/Authority.yml
/jugevents/jugevents-core/src/test/resources/fixtures/Continent.yml
/jugevents/jugevents-core/src/test/resources/fixtures/Country.yml
/jugevents/jugevents-core/src/test/resources/fixtures/Event.yml
/jugevents/jugevents-core/src/test/resources/fixtures/EventLink.yml
/jugevents/jugevents-core/src/test/resources/fixtures/Group.yml
/jugevents/jugevents-core/src/test/resources/fixtures/JUG.yml
/jugevents/jugevents-core/src/test/resources/fixtures/Jugger.yml
/jugevents/jugevents-core/src/test/resources/fixtures/Participant.yml
/jugevents/jugevents-core/src/test/resources/fixtures/Speaker.yml
/jugevents/jugevents-core/src/test/resources/fixtures/User.yml
/jugevents/jugevents-core/src/test/resources/images/enrico.jpg
Deleted:
/jugevents/jugevents-web/src/main/java/it/jugpadova/Conf.java
/jugevents/jugevents-web/src/main/java/it/jugpadova/JugEventsDaos.java
/jugevents/jugevents-web/src/main/resources/images/enrico.jpg
/jugevents/jugevents-web/src/test/java/it/jugpadova/JugEventsBaseTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/EventDaoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/EventResourceDaoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/JUGDaoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/JuggerDaoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/ParticipantDaoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/SpeakerDaoTest.java
/jugevents/jugevents-web/src/test/resources/fixtures/Authority.yml
/jugevents/jugevents-web/src/test/resources/fixtures/Continent.yml
/jugevents/jugevents-web/src/test/resources/fixtures/Country.yml
/jugevents/jugevents-web/src/test/resources/fixtures/Event.yml
/jugevents/jugevents-web/src/test/resources/fixtures/EventLink.yml
/jugevents/jugevents-web/src/test/resources/fixtures/Group.yml
/jugevents/jugevents-web/src/test/resources/fixtures/JUG.yml
/jugevents/jugevents-web/src/test/resources/fixtures/Jugger.yml
/jugevents/jugevents-web/src/test/resources/fixtures/Participant.yml
/jugevents/jugevents-web/src/test/resources/fixtures/Speaker.yml
/jugevents/jugevents-web/src/test/resources/fixtures/User.yml
Modified:
/jugevents/jugevents-core/pom.xml
/jugevents/jugevents-core/src/main/java/org/jugevents/core/util/Utilities.java
/jugevents/jugevents-web/src/main/java/it/jugpadova/blo/EventBo.java
/jugevents/jugevents-web/src/main/java/it/jugpadova/blo/JugBo.java
/jugevents/jugevents-web/src/main/java/it/jugpadova/blo/JuggerBo.java
/jugevents/jugevents-web/src/main/java/it/jugpadova/blo/ParticipantBo.java
/jugevents/jugevents-web/src/main/java/it/jugpadova/blol/SchedulerBo.java
/jugevents/jugevents-web/src/main/java/it/jugpadova/blol/ServicesBo.java
/jugevents/jugevents-web/src/main/webapp/WEB-INF/applicationContext.xml
/jugevents/jugevents-web/src/test/java/it/jugpadova/FootprintTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/JugEventsControllerTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/ParancoeTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/SanityTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/bean/SpeakerBeanTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/blo/EventBoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/blo/EventRegistrationOpenTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/blo/JugBoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/blo/JuggerBoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/blo/ParticipantBadgeBoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/blol/FeedsBoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/blol/SchedulerBoTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/controllers/EventEditControllerTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/controllers/HomeControllerTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/plugins/TestSecurityPlugin.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/util/UtilitiesTest.java
/jugevents/jugevents-web/src/test/java/it/jugpadova/util/mime/MimeUtilTest.java
/jugevents/jugevents-web/src/test/resources/database-test.xml
/jugevents/pom.xml
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/main/java/org/jugevents/core/Conf.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,83 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jugevents.core;
+
+import org.parancoe.util.BaseConf;
+
+/**
+ * here you can put configuration specific getters
+ */
+public class Conf extends BaseConf {
+
+ public String getMyParam() {
+ return getConfiguration().getString("myparam");
+ }
+
+ public String getAnalyticsKey() {
+ return getConfiguration().getString("analyticsKey");
+ }
+
+ public String getJugeventsBaseUrl() {
+ return getConfiguration().getString("jugeventsBaseUrl");
+ }
+
+ public String getConfirmationSenderEmailAddress() {
+ return
getConfiguration().getString("confirmationSenderEmailAddress");
+ }
+
+ public int getUpcomingEventDays() {
+ return getConfiguration().getInt("upcomingEventDays", 7);
+ }
+
+ public int getNewEventDays() {
+ return getConfiguration().getInt("newEventDays", 7);
+ }
+
+ public String getDefaultKmlUrl() {
+ return getConfiguration().getString("defaultKmlUrl");
+ }
+
+ public double getThresholdAccess() {
+ return getConfiguration().getDouble("thresholdAccess", 1);
+ }
+
+ public String getAdminMailJE() {
+ return getConfiguration().getString("adminMailJE");
+ }
+
+ public String getKmlUpdateFromAddress() {
+ return getConfiguration().getString("kmlUpdateFromAddress");
+ }
+
+ public String getKmlUpdateToAddress() {
+ return getConfiguration().getString("kmlUpdateToAddress");
+ }
+
+ public String getKmlUpdateReplyAddress() {
+ return getConfiguration().getString("kmlUpdateReplyAddress");
+ }
+
+ public String getKmlUpdateSubjectPrefix() {
+ return getConfiguration().getString("kmlUpdateSubjectPrefix");
+ }
+
+ public String getInternalMail() {
+ return getConfiguration().getString("internalMail");
+ }
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/main/java/org/jugevents/core/JugEventsDaos.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,73 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jugevents.core;
+
+
+import org.jugevents.core.dao.ArchiveVideoResourceDao;
+import org.jugevents.core.dao.EventDao;
+import org.jugevents.core.dao.EventLinkDao;
+import org.jugevents.core.dao.EventResourceDao;
+import org.jugevents.core.dao.FlickrResourceDao;
+import org.jugevents.core.dao.JUGDao;
+import org.jugevents.core.dao.JuggerDao;
+import org.jugevents.core.dao.ParticipantDao;
+import org.jugevents.core.dao.SlideShareResourceDao;
+import org.jugevents.core.dao.YouTubeResourceDao;
+import org.lambico.dao.Daos;
+import org.parancoe.plugins.securityevolution.AuthorityDao;
+import org.parancoe.plugins.securityevolution.UserDao;
+import org.parancoe.plugins.world.ContinentDao;
+import org.parancoe.plugins.world.CountryDao;
+
+/**
+ * Interface for the DAO Provider. Doesn't require an implementation.
Simply add
+ * methods for the DAOs you need to use. The convention for the methods is
get<dao_bean_id>.
+ */
+public interface JugEventsDaos extends Daos {
+
+ public EventDao getEventDao();
+
+ public ParticipantDao getParticipantDao();
+
+ public JuggerDao getJuggerDao();
+
+ public UserDao getUserDao();
+
+ public AuthorityDao getAuthorityDao();
+
+ public CountryDao getCountryDao();
+
+ public ContinentDao getContinentDao();
+
+ public JUGDao getJUGDao();
+
+
+
+ public EventResourceDao getEventResourceDao();
+
+ public EventLinkDao getEventLinkDao();
+
+ public SlideShareResourceDao getSlideShareResourceDao();
+
+ public FlickrResourceDao getFlickrResourceDao();
+
+ public ArchiveVideoResourceDao getArchiveVideoResourceDao();
+
+ public YouTubeResourceDao getYouTubeResourceDao();
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/test/java/org/jugevents/core/JugEventsBaseTest.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,63 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jugevents.core;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import org.apache.commons.io.IOUtils;
+import org.jugevents.core.po.Event;
+import org.jugevents.core.po.EventLink;
+import org.jugevents.core.po.JUG;
+import org.jugevents.core.po.Jugger;
+import org.jugevents.core.po.Participant;
+import org.jugevents.core.po.Speaker;
+
+import org.lambico.test.spring.hibernate.junit4.FixtureSet;
+import org.parancoe.plugins.securityevolution.Authority;
+import org.parancoe.plugins.securityevolution.Group;
+import org.parancoe.plugins.securityevolution.User;
+import org.parancoe.plugins.world.Continent;
+import org.parancoe.plugins.world.Country;
+import org.parancoe.test.junit4.AbstractContextTest;
+
+
+/**
+ * Base test class for test of JUG Events.
+ *
+ * @author lucio
+ */
+
+@FixtureSet(modelClasses = {Continent.class, Country.class,
Authority.class, Group.class, User.class,
+ JUG.class, Jugger.class, Event.class, EventLink.class,
Participant.class, Speaker.class})
+public abstract class JugEventsBaseTest extends AbstractContextTest {
+
+ protected void writeTestFile(String prefix, String suffix, byte[]
bytes) throws IOException {
+ final File tempFile = File.createTempFile(prefix, suffix);
+ OutputStream out = null;
+ try {
+ out = new FileOutputStream(tempFile);
+ out.write(bytes);
+ out.flush();
+
logger.info("Wrote test file " + tempFile.getAbsolutePath());
+ } finally {
+ IOUtils.closeQuietly(out);
+ }
+ }
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/EventDaoTest.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,49 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jugevents.core.dao;
+
+
+import java.util.List;
+import javax.annotation.Resource;
+import static org.hamcrest.collection.IsCollectionWithSize.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.jugevents.core.JugEventsBaseTest;
+import org.jugevents.core.dao.EventDao;
+import org.jugevents.core.po.Event;
+import org.jugevents.core.po.Speaker;
+import org.junit.Test;
+
+/**
+ * @author Enrico Giurin
+ *
+ */
+public class EventDaoTest extends JugEventsBaseTest {
+
+ @Resource
+ private EventDao eventDao;
+
+ @Test
+ public void findByTitle() {
+ List<Event> events = eventDao.findByTitle("Springframework%");
+ assertThat(events, hasSize(1));
+ Event eventSF = events.get(0);
+ List<Speaker> speakers = eventSF.getSpeakers();
+ assertThat(speakers, hasSize(2));
+ }
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/EventResourceDaoTest.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,44 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jugevents.core.dao;
+
+import org.jugevents.core.JugEventsBaseTest;
+import java.util.List;
+import javax.annotation.Resource;
+import static org.hamcrest.collection.IsCollectionWithSize.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.jugevents.core.dao.EventResourceDao;
+import org.jugevents.core.po.EventResource;
+import org.junit.Test;
+
+/**
+ *
+ * @author lucio
+ */
+public class EventResourceDaoTest extends JugEventsBaseTest {
+
+ @Resource
+ private EventResourceDao eventResourceDao;
+
+ @Test
+ public void findAll() {
+ List<EventResource> resources = eventResourceDao.findAll();
+ assertThat(resources, hasSize(7));
+ }
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/JUGDaoTest.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,65 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jugevents.core.dao;
+
+import org.jugevents.core.JugEventsBaseTest;
+import java.util.List;
+import javax.annotation.Resource;
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.collection.IsCollectionWithSize.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.jugevents.core.dao.JUGDao;
+import org.jugevents.core.po.JUG;
+import org.junit.Test;
+
+/**
+ *
+ * @author Enrico Giurin
+ */
+public class JUGDaoTest extends JugEventsBaseTest {
+
+ @Resource
+ private JUGDao jugDao;
+
+ @Test
+ public void findByPartialName() {
+ List<JUG> jugs = jugDao.findByPartialName("%J%");
+ assertThat(jugs, hasSize(3));
+ }
+
+ @Test
+ public void findByPartialJugNameAndCountry() {
+ List<JUG> jugs =
jugDao.findByPartialJugNameAndCountry("J%", "It%");
+ assertThat(jugs, hasSize(2));
+ }
+
+ @Test
+ public void findByNameAndCountryEN() {
+ List<JUG> jugs = jugDao.findByNameAndCountryEN("JUG
Padova", "Italy");
+ assertThat(jugs, hasSize(1));
+ }
+
+ @Test
+ public void findByICName() {
+ JUG jug = jugDao.findByICName("jug padova");
+ assertThat(jug, is(notNullValue()));
+ assertThat(jug.getName(), is(equalTo("JUG Padova")));
+ }
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/JuggerDaoTest.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,51 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jugevents.core.dao;
+
+import org.jugevents.core.JugEventsBaseTest;
+import java.util.List;
+import javax.annotation.Resource;
+import static org.hamcrest.collection.IsCollectionWithSize.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.jugevents.core.dao.JuggerDao;
+import org.jugevents.core.po.Jugger;
+import org.junit.Test;
+
+/**
+ *
+ * @author lucio
+ */
+public class JuggerDaoTest extends JugEventsBaseTest {
+
+ @Resource
+ private JuggerDao juggerDao;
+
+ @Test
+ public void findByPartialJugNameAndCountryAndContinent() {
+ List<Jugger> juggers =
juggerDao.findByPartialJugNameAndCountryAndContinent("%J%", "%Ital%",
+ "%Eur%");
+ assertThat(juggers, hasSize(3));
+ }
+
+ @Test
+ public void findAll() {
+ List<Jugger> juggers = juggerDao.findAll();
+ assertThat(juggers, hasSize(3));
+ }
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/ParticipantDaoTest.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,104 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jugevents.core.dao;
+
+import org.jugevents.core.JugEventsBaseTest;
+import java.util.List;
+import javax.annotation.Resource;
+import static org.hamcrest.collection.IsCollectionWithSize.*;
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.jugevents.core.dao.EventDao;
+import org.jugevents.core.dao.ParticipantDao;
+import org.jugevents.core.po.Event;
+import org.jugevents.core.po.Participant;
+import org.junit.Test;
+
+/**
+ * Tests on the ParticipantDao methods (and queries)
+ *
+ * @author Lucio Benfante
+ */
+public class ParticipantDaoTest extends JugEventsBaseTest {
+
+ @Resource
+ private ParticipantDao participantDao;
+ @Resource
+ private EventDao eventDao;
+
+ /**
+ * Test of findConfirmedParticipantsByEventId method, of class
ParticipantDao.
+ */
+ @Test
+ public void findConfirmedParticipantsByEventId() {
+ List<Event> futureEvent = retrieveFutureEvent();
+ List<Participant> participants =
+
participantDao.findConfirmedParticipantsByEventId(futureEvent.
+ get(0).getId());
+ assertThat(participants, hasSize(7));
+ }
+
+ /**
+ * Test of findNotConfirmedParticipantsByEventId method, of class
ParticipantDao.
+ */
+ @Test
+ public void findNotConfirmedParticipantsByEventId() {
+ List<Event> futureEvent = retrieveFutureEvent();
+ List<Participant> participants =
+
participantDao.findNotConfirmedParticipantsByEventId(futureEvent.get(0).
+ getId());
+ assertThat(participants, hasSize(2));
+ }
+
+ /**
+ * Test of findCancelledParticipantsByEventId method, of class
ParticipantDao.
+ */
+ @Test
+ public void findCancelledParticipantsByEventId() {
+ List<Event> futureEvent = retrieveFutureEvent();
+ List<Participant> participants = participantDao.
+
findCancelledParticipantsByEventId(futureEvent.get(0).getId());
+ assertThat(participants, hasSize(2));
+ }
+
+ /**
+ * Test the consistency of the lists of participants.
+ *
+ */
+ @Test
+ public void participantListsConsistency() {
+ List<Event> futureEvent = retrieveFutureEvent();
+ Long eventId = futureEvent.get(0).getId();
+ List<Participant> all =
participantDao.findParticipantsByEventId(eventId);
+ List<Participant> confirmed =
+ participantDao.findConfirmedParticipantsByEventId(eventId);
+ List<Participant> notConfirmed =
+
participantDao.findNotConfirmedParticipantsByEventId(eventId);
+ List<Participant> cancelled = participantDao.
+ findCancelledParticipantsByEventId(eventId);
+ assertThat(all.size(),
+ is(equalTo(confirmed.size() + notConfirmed.size() +
cancelled.size())));
+ }
+
+ private List<Event> retrieveFutureEvent() {
+ List<Event> futureEvent = eventDao.findByTitle("Future Meeting");
+ assertThat(futureEvent, hasSize(1));
+ return futureEvent;
+ }
+}
=======================================
--- /dev/null
+++
/jugevents/jugevents-core/src/test/java/org/jugevents/core/dao/SpeakerDaoTest.java
Sat May 25 17:49:36 2013
@@ -0,0 +1,87 @@
+/**
+ * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+ *
+ * This file is part of JUG Events - Core.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jugevents.core.dao;
+
+import org.jugevents.core.JugEventsBaseTest;
+
+import java.util.List;
+import javax.annotation.Resource;
+import static org.hamcrest.collection.IsCollectionWithSize.*;
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.jugevents.core.dao.SpeakerDao;
+import org.jugevents.core.po.Event;
+import org.jugevents.core.po.Speaker;
+import org.jugevents.core.util.Utilities;
+import org.junit.Test;
+
+/**
+ * @author Enrico Giurin
+ *
+ */
+public class SpeakerDaoTest extends JugEventsBaseTest {
+
+ @Resource
+ private SpeakerDao speakerDao;
+
+ @Test
+ public void findAll() {
+ List<Speaker> speakers = speakerDao.findAll();
+ assertThat(speakers, hasSize(3));
+ }
+
+ @Test
+ public void findEventsByPartialSpeakerEmail() {
+ List<Event> events =
speakerDao.findEventsByPartialSpeakerEmail("lucio%");
+ assertThat(events, hasSize(2));
+ }
+
+ @Test
+ public void findSpeakersByPartialEventTitle() {
+ List<Speaker> speakers =
speakerDao.findSpeakersByPartialEventTitle("Springframework%");
+ assertThat(speakers, hasSize(2));
+ Speaker speakerLucio = speakerDao.findByResume("%is the
president%").get(0);
+ Speaker speakerEnrico = speakerDao.findByResume("%electronic
engineer%").get(0);
+ assertThat(speakers.contains(speakerLucio), is(true));
+ assertThat(speakers.contains(speakerEnrico), is(true));
+ assertThat(speakerEnrico.getEmail(),
is(equalTo("
enrico...@gmail.com")));
+ assertThat(speakerLucio.getUrl(),
is(equalTo("
http://benfante.blogspot.com/")));
+ assertThat(speakerLucio.getSkypeId(), is(equalTo("benfante")));
+ }
+
+// @Test
+// public void insertDuplicateKey() {
+// SpeakerCoreAttributes duplicateSpeaker = new
SpeakerCoreAttributes("enrico", "giurin", "
a...@bbb.com");
+// //I was expecting this method would throw an exception, not only
logging the error
+// speakerCoreAttributesDao.store(duplicateSpeaker);
+// TODO I cannot check any results as I have an hibernate exception
+// assertThat(1,
speakerCoreAttributesDao.findByFirstNameAndLastName("enrico",is(equalTo( "giurin").size())));
+// TODO check why the method findAll returns null...
+// assertThat(2,is(equalTo(
speakerCoreAttributesDao.findAll().size())));
+// }
+
+ @Test
+ public void insertImage() throws Exception {
+ byte[] image = Utilities.resourceToBytes("/images/enrico.jpg");
+ assertThat(image.length, is(2402));
+ Speaker speakerEnrico = speakerDao.findByResume("%electronic
engineer%").get(0);
+ speakerEnrico.setPicture(image);
+ speakerDao.store(speakerEnrico);
+ }
+}
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Authority.yml Sat
May 25 17:49:36 2013
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Authority-admin
+ role: ROLE_ADMIN
+- &Authority-juggerAdmin
+ role: ROLE_JUGGER_ADMIN
+- &Authority-jugger
+ role: ROLE_JUGGER
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Continent.yml Sat
May 25 17:49:36 2013
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Continent-NorthAmerica
+ name: "North America"
+- &Continent-SouthAmerica
+ name: "South America"
+- &Continent-Antarctica
+ name: "Antarctica"
+- &Continent-Africa
+ name: "Africa"
+- &Continent-Europe
+ name: "Europe"
+- &Continent-Asia
+ name: "Asia"
+- &Continent-Australia
+ name: "Australia"
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Country.yml Sat
May 25 17:49:36 2013
@@ -0,0 +1,627 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Country-AE
+ isoCode: AE
+ languageIsoCode: ar
+ languageVariant: null
+ localName: الإمارات
+ englishName: United Arab Emirates
+ continent: *Continent-Asia
+- &Country-AL
+ isoCode: AL
+ languageIsoCode: sq
+ languageVariant: null
+ localName: Shqipëria
+ englishName: Albania
+ continent: *Continent-Europe
+- &Country-AR
+ isoCode: AR
+ languageIsoCode: es
+ languageVariant: null
+ localName: Argentina
+ englishName: Argentina
+ continent: *Continent-SouthAmerica
+- &Country-AT
+ isoCode: AT
+ languageIsoCode: de
+ languageVariant: null
+ localName: Österreich
+ englishName: Austria
+ continent: *Continent-Europe
+- &Country-AU
+ isoCode: AU
+ languageIsoCode: en
+ languageVariant: null
+ localName: Australia
+ englishName: Australia
+ continent: *Continent-Australia
+- &Country-BA
+ isoCode: BA
+ languageIsoCode: sr
+ languageVariant: null
+ localName: Босна и Херцеговина
+ englishName: Bosnia and Herzegovina
+ continent: *Continent-Europe
+- &Country-BE
+ isoCode: BE
+ languageIsoCode: fr
+ languageVariant: null
+ localName: Belgique
+ englishName: Belgium
+ continent: *Continent-Europe
+- &Country-BG
+ isoCode: BG
+ languageIsoCode: bg
+ languageVariant: null
+ localName: България
+ englishName: Bulgaria
+ continent: *Continent-Europe
+- &Country-BH
+ isoCode: BH
+ languageIsoCode: ar
+ languageVariant: null
+ localName: البحرين
+ englishName: Bahrain
+ continent: *Continent-Asia
+- &Country-BO
+ isoCode: BO
+ languageIsoCode: es
+ languageVariant: null
+ localName: Bolivia
+ englishName: Bolivia
+ continent: *Continent-SouthAmerica
+- &Country-BR
+ isoCode: BR
+ languageIsoCode: pt
+ languageVariant: null
+ localName: Brasil
+ englishName: Brazil
+ continent: *Continent-SouthAmerica
+- &Country-BY
+ isoCode: BY
+ languageIsoCode: be
+ languageVariant: null
+ localName: Беларусь
+ englishName: Belarus
+ continent: *Continent-Europe
+- &Country-CA
+ isoCode: CA
+ languageIsoCode: en
+ languageVariant: null
+ localName: Canada
+ englishName: Canada
+ continent: *Continent-NorthAmerica
+- &Country-CH
+ isoCode: CH
+ languageIsoCode: de
+ languageVariant: null
+ localName: Schweiz
+ englishName: Switzerland
+ continent: *Continent-Europe
+- &Country-CL
+ isoCode: CL
+ languageIsoCode: es
+ languageVariant: null
+ localName: Chile
+ englishName: Chile
+ continent: *Continent-SouthAmerica
+- &Country-CN
+ isoCode: CN
+ languageIsoCode: zh
+ languageVariant: null
+ localName: 中国
+ englishName: China
+ continent: *Continent-Asia
+- &Country-CO
+ isoCode: CO
+ languageIsoCode: es
+ languageVariant: null
+ localName: Colombia
+ englishName: Colombia
+ continent: *Continent-SouthAmerica
+- &Country-CR
+ isoCode: CR
+ languageIsoCode: es
+ languageVariant: null
+ localName: Costa Rica
+ englishName: Costa Rica
+ continent: *Continent-SouthAmerica
+- &Country-CS
+ isoCode: CS
+ languageIsoCode: sr
+ languageVariant: null
+ localName: Србија и Црна Гора
+ englishName: Serbia and Montenegro
+ continent: *Continent-Europe
+- &Country-CZ
+ isoCode: CZ
+ languageIsoCode: cs
+ languageVariant: null
+ localName: Česká republika
+ englishName: Czech Republic
+ continent: *Continent-Europe
+- &Country-DE
+ isoCode: DE
+ languageIsoCode: de
+ languageVariant: null
+ localName: Deutschland
+ englishName: Germany
+ continent: *Continent-Europe
+- &Country-DK
+ isoCode: DK
+ languageIsoCode: da
+ languageVariant: null
+ localName: Danmark
+ englishName: Denmark
+ continent: *Continent-Europe
+- &Country-DO
+ isoCode: DO
+ languageIsoCode: es
+ languageVariant: null
+ localName: República Dominicana
+ englishName: Dominican Republic
+ continent: *Continent-SouthAmerica
+- &Country-DZ
+ isoCode: DZ
+ languageIsoCode: ar
+ languageVariant: null
+ localName: الجزائر
+ englishName: Algeria
+ continent: *Continent-Africa
+- &Country-EC
+ isoCode: EC
+ languageIsoCode: es
+ languageVariant: null
+ localName: Ecuador
+ englishName: Ecuador
+ continent: *Continent-SouthAmerica
+- &Country-EE
+ isoCode: EE
+ languageIsoCode: et
+ languageVariant: null
+ localName: Eesti
+ englishName: Estonia
+ continent: *Continent-Europe
+- &Country-EG
+ isoCode: EG
+ languageIsoCode: ar
+ languageVariant: null
+ localName: مصر
+ englishName: Egypt
+ continent: *Continent-Africa
+- &Country-ES
+ isoCode: ES
+ languageIsoCode: es
+ languageVariant: null
+ localName: España
+ englishName: Spain
+ continent: *Continent-Europe
+- &Country-FI
+ isoCode: FI
+ languageIsoCode: fi
+ languageVariant: null
+ localName: Suomi
+ englishName: Finland
+ continent: *Continent-Europe
+- &Country-FR
+ isoCode: FR
+ languageIsoCode: fr
+ languageVariant: null
+ localName: France
+ englishName: France
+ continent: *Continent-Europe
+- &Country-GB
+ isoCode: GB
+ languageIsoCode: en
+ languageVariant: null
+ localName: United Kingdom
+ englishName: United Kingdom
+ continent: *Continent-Europe
+- &Country-GR
+ isoCode: GR
+ languageIsoCode: el
+ languageVariant: null
+ localName: Ελλάδα
+ englishName: Greece
+ continent: *Continent-Europe
+- &Country-GT
+ isoCode: GT
+ languageIsoCode: es
+ languageVariant: null
+ localName: Guatemala
+ englishName: Guatemala
+ continent: *Continent-SouthAmerica
+- &Country-HK
+ isoCode: HK
+ languageIsoCode: zh
+ languageVariant: null
+ localName: 香港
+ englishName: Hong Kong
+ continent: *Continent-Asia
+- &Country-HN
+ isoCode: HN
+ languageIsoCode: es
+ languageVariant: null
+ localName: Honduras
+ englishName: Honduras
+ continent: *Continent-SouthAmerica
+- &Country-HR
+ isoCode: HR
+ languageIsoCode: hr
+ languageVariant: null
+ localName: Hrvatska
+ englishName: Croatia
+ continent: *Continent-Europe
+- &Country-HU
+ isoCode: HU
+ languageIsoCode: hu
+ languageVariant: null
+ localName: Magyarország
+ englishName: Hungary
+ continent: *Continent-Europe
+- &Country-IE
+ isoCode: IE
+ languageIsoCode: en
+ languageVariant: null
+ localName: Ireland
+ englishName: Ireland
+ continent: *Continent-Europe
+- &Country-IL
+ isoCode: IL
+ languageIsoCode: iw
+ languageVariant: null
+ localName: ישראל
+ englishName: Israel
+ continent: *Continent-Asia
+- &Country-IN
+ isoCode: IN
+ languageIsoCode: hi
+ languageVariant: null
+ localName: भारत
+ englishName: India
+ continent: *Continent-Asia
+- &Country-IQ
+ isoCode: IQ
+ languageIsoCode: ar
+ languageVariant: null
+ localName: العراق
+ englishName: Iraq
+ continent: *Continent-Asia
+- &Country-IS
+ isoCode: IS
+ languageIsoCode: is
+ languageVariant: null
+ localName: Ísland
+ englishName: Iceland
+ continent: *Continent-Europe
+- &Country-IT
+ isoCode: IT
+ languageIsoCode: it
+ languageVariant: null
+ localName: Italia
+ englishName: Italy
+ continent: *Continent-Europe
+- &Country-JO
+ isoCode: JO
+ languageIsoCode: ar
+ languageVariant: null
+ localName: الأردن
+ englishName: Jordan
+ continent: *Continent-Asia
+- &Country-JP
+ isoCode: JP
+ languageIsoCode: ja
+ languageVariant: null
+ localName: 日本
+ englishName: Japan
+ continent: *Continent-Asia
+- &Country-KR
+ isoCode: KR
+ languageIsoCode: ko
+ languageVariant: null
+ localName: 대한민국
+ englishName: South Korea
+ continent: *Continent-Asia
+- &Country-KW
+ isoCode: KW
+ languageIsoCode: ar
+ languageVariant: null
+ localName: الكويت
+ englishName: Kuwait
+ continent: *Continent-Asia
+- &Country-LB
+ isoCode: LB
+ languageIsoCode: ar
+ languageVariant: null
+ localName: لبنان
+ englishName: Lebanon
+ continent: *Continent-Asia
+- &Country-LT
+ isoCode: LT
+ languageIsoCode: lt
+ languageVariant: null
+ localName: Lietuva
+ englishName: Lithuania
+ continent: *Continent-Europe
+- &Country-LU
+ isoCode: LU
+ languageIsoCode: fr
+ languageVariant: null
+ localName: Luxembourg
+ englishName: Luxembourg
+ continent: *Continent-Europe
+- &Country-LV
+ isoCode: LV
+ languageIsoCode: lv
+ languageVariant: null
+ localName: Latvija
+ englishName: Latvia
+ continent: *Continent-Europe
+- &Country-LY
+ isoCode: LY
+ languageIsoCode: ar
+ languageVariant: null
+ localName: ليبيا
+ englishName: Libya
+ continent: *Continent-Africa
+- &Country-MA
+ isoCode: MA
+ languageIsoCode: ar
+ languageVariant: null
+ localName: المغرب
+ englishName: Morocco
+ continent: *Continent-Africa
+- &Country-MK
+ isoCode: MK
+ languageIsoCode: mk
+ languageVariant: null
+ localName: Македонија
+ englishName: Macedonia
+ continent: *Continent-Europe
+- &Country-MX
+ isoCode: MX
+ languageIsoCode: es
+ languageVariant: null
+ localName: México
+ englishName: Mexico
+ continent: *Continent-SouthAmerica
+- &Country-NI
+ isoCode: NI
+ languageIsoCode: es
+ languageVariant: null
+ localName: Nicaragua
+ englishName: Nicaragua
+ continent: *Continent-SouthAmerica
+- &Country-NL
+ isoCode: NL
+ languageIsoCode: nl
+ languageVariant: null
+ localName: Nederland
+ englishName: Netherlands
+ continent: *Continent-Europe
+- &Country-NO
+ isoCode: NO
+ languageIsoCode: no
+ languageVariant: null
+ localName: Norge
+ englishName: Norway
+ continent: *Continent-Europe
+- &Country-NZ
+ isoCode: NZ
+ languageIsoCode: en
+ languageVariant: null
+ localName: New Zealand
+ englishName: New Zealand
+ continent: *Continent-Asia
+- &Country-OM
+ isoCode: OM
+ languageIsoCode: ar
+ languageVariant: null
+ localName: سلطنة عمان
+ englishName: Oman
+ continent: *Continent-Asia
+- &Country-PA
+ isoCode: PA
+ languageIsoCode: es
+ languageVariant: null
+ localName: Panamá
+ englishName: Panama
+ continent: *Continent-SouthAmerica
+- &Country-PE
+ isoCode: PE
+ languageIsoCode: es
+ languageVariant: null
+ localName: Perú
+ englishName: Peru
+ continent: *Continent-SouthAmerica
+- &Country-PL
+ isoCode: PL
+ languageIsoCode: pl
+ languageVariant: null
+ localName: Polska
+ englishName: Poland
+ continent: *Continent-Europe
+- &Country-PR
+ isoCode: PR
+ languageIsoCode: es
+ languageVariant: null
+ localName: Puerto Rico
+ englishName: Puerto Rico
+ continent: *Continent-SouthAmerica
+- &Country-PT
+ isoCode: PT
+ languageIsoCode: pt
+ languageVariant: null
+ localName: Portugal
+ englishName: Portugal
+ continent: *Continent-Europe
+- &Country-PY
+ isoCode: PY
+ languageIsoCode: es
+ languageVariant: null
+ localName: Paraguay
+ englishName: Paraguay
+ continent: *Continent-SouthAmerica
+- &Country-QA
+ isoCode: QA
+ languageIsoCode: ar
+ languageVariant: null
+ localName: قطر
+ englishName: Qatar
+ continent: *Continent-Asia
+- &Country-RO
+ isoCode: RO
+ languageIsoCode: ro
+ languageVariant: null
+ localName: România
+ englishName: Romania
+ continent: *Continent-Europe
+- &Country-RU
+ isoCode: RU
+ languageIsoCode: ru
+ languageVariant: null
+ localName: Россия
+ englishName: Russia
+ continent: *Continent-Europe
+- &Country-SA
+ isoCode: SA
+ languageIsoCode: ar
+ languageVariant: null
+ localName: السعودية
+ englishName: Saudi Arabia
+ continent: *Continent-Asia
+- &Country-SD
+ isoCode: SD
+ languageIsoCode: ar
+ languageVariant: null
+ localName: السودان
+ englishName: Sudan
+ continent: *Continent-Africa
+- &Country-SE
+ isoCode: SE
+ languageIsoCode: sv
+ languageVariant: null
+ localName: Sverige
+ englishName: Sweden
+ continent: *Continent-Europe
+- &Country-SI
+ isoCode: SI
+ languageIsoCode: sl
+ languageVariant: null
+ localName: Slovenija
+ englishName: Slovenia
+ continent: *Continent-Europe
+- &Country-SK
+ isoCode: SK
+ languageIsoCode: sk
+ languageVariant: null
+ localName: Slovenská republika
+ englishName: Slovakia
+ continent: *Continent-Europe
+- &Country-SV
+ isoCode: SV
+ languageIsoCode: es
+ languageVariant: null
+ localName: El Salvador
+ englishName: El Salvador
+ continent: *Continent-SouthAmerica
+- &Country-SY
+ isoCode: SY
+ languageIsoCode: ar
+ languageVariant: null
+ localName: سوريا
+ englishName: Syria
+ continent: *Continent-Asia
+- &Country-TH
+ isoCode: TH
+ languageIsoCode: th
+ languageVariant: null
+ localName: ประเทศไทย
+ englishName: Thailand
+ continent: *Continent-Asia
+- &Country-TN
+ isoCode: TN
+ languageIsoCode: ar
+ languageVariant: null
+ localName: تونس
+ englishName: Tunisia
+ continent: *Continent-Africa
+- &Country-TR
+ isoCode: TR
+ languageIsoCode: tr
+ languageVariant: null
+ localName: Türkiye
+ englishName: Turkey
+ continent: *Continent-Asia
+- &Country-TW
+ isoCode: TW
+ languageIsoCode: zh
+ languageVariant: null
+ localName: 台灣
+ englishName: Taiwan
+ continent: *Continent-Asia
+- &Country-UA
+ isoCode: UA
+ languageIsoCode: uk
+ languageVariant: null
+ localName: Україна
+ englishName: Ukraine
+ continent: *Continent-Europe
+- &Country-US
+ isoCode: US
+ languageIsoCode: en
+ languageVariant: null
+ localName: United States
+ englishName: United States
+ continent: *Continent-NorthAmerica
+- &Country-UY
+ isoCode: UY
+ languageIsoCode: es
+ languageVariant: null
+ localName: Uruguay
+ englishName: Uruguay
+ continent: *Continent-SouthAmerica
+- &Country-VE
+ isoCode: VE
+ languageIsoCode: es
+ languageVariant: null
+ localName: Venezuela
+ englishName: Venezuela
+ continent: *Continent-SouthAmerica
+- &Country-VN
+ isoCode: VN
+ languageIsoCode: vi
+ languageVariant: null
+ localName: Việt Nam
+ englishName: Vietnam
+ continent: *Continent-Asia
+- &Country-YE
+ isoCode: YE
+ languageIsoCode: ar
+ languageVariant: null
+ localName: اليمن
+ englishName: Yemen
+ continent: *Continent-SouthAmerica
+- &Country-ZA
+ isoCode: ZA
+ languageIsoCode: en
+ languageVariant: null
+ localName: South Africa
+ englishName: South Africa
+ continent: *Continent-Africa
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Event.yml Sat May
25 17:49:36 2013
@@ -0,0 +1,66 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Event-springframework
+ title: "Springframework Meeting 2007"
+ creationDate: 2007-01-01
+ startDate: 2007-07-14
+ startTime: "09:00 AM"
+ endDate: 2007-07-14
+ endTime: "02:00 PM"
+ location: DIEE
+ directions: "Aule B0 e B1"
+ description: "Lo Spring Framework Italian User Group in collaborazione
con il Java User Group Sardegna Onlus e il DIEE ha organizzato il primo
Spring Meeting del 2007"
+ filter: Textile
+ jugOwner: *JUG-Sardegna
+- &Event-jugpdnov
+ title: "JUG Padova Meeting #38"
+ creationDate: 2007-01-01
+ startDate: 2007-11-24
+ startTime: "09:00 AM"
+ endDate: 2007-11-24
+ endTime: "01:00 PM"
+ location: DEI
+ directions: "Aula De"
+ description: "Meeting di novembre del JUG Padova"
+ filter: Textile
+ jugOwner: *JUG-Padova
+- &Event-jugpdgiu
+ title: "JUG Padova Meeting #39"
+ creationDate: 2007-01-01
+ startDate: 2008-06-24
+ startTime: "09:00 AM"
+ endDate: 2008-06-24
+ endTime: "01:00 PM"
+ location: DEI
+ directions: "Aula Ce"
+ description: "Meeting di giugno del JUG Padova"
+ filter: Textile
+ jugOwner: *JUG-Padova
+- &Event-future
+ title: "Future Meeting"
+ creationDate: 2008-01-01
+ startDate: 2020-11-24
+ startTime: "09:00 AM"
+ endDate: 2020-11-24
+ endTime: "01:00 PM"
+ location: DEI
+ directions: "Aula De"
+ description: "Meeting di novembre del JUG Padova"
+ filter: Textile
+ jugOwner: *JUG-Padova
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/EventLink.yml Sat
May 25 17:49:36 2013
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &EventLink-futureEventWebPage
+ description: "Web Page of the future event"
+ event: *Event-future
+ url: "
http://www.jugpadova.it"
+- &EventLink-futureEventSlides01
+ description: "Slides of the future event 01"
+ event: *Event-future
+
url: "
http://www.jugpadova.it/slides01/very/very/very/very/very/very/long"
+- &EventLink-futureEventSlides02
+ description: "Slides of the future event 02"
+ event: *Event-future
+ url: "
http://www.jugpadova.it/slides02"
+- &EventLink-futureEventSlides03
+ description: "Slides of the future event 03"
+ event: *Event-future
+ url: "
http://www.jugpadova.it/slides03"
+- &EventLink-futureEventSlides04
+ description: "Slides of the future event 04"
+ event: *Event-future
+ url: "
http://www.jugpadova.it/slides04"
+- &EventLink-futureEventSlides05
+ description: "Slides of the future event 05"
+ event: *Event-future
+ url: "
http://www.jugpadova.it/slides05"
+- &EventLink-futureEventSlides06
+ description: "Slides of the future event 06"
+ event: *Event-future
+ url: "
http://www.jugpadova.it/slides06"
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Group.yml Sat May
25 17:49:36 2013
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Group-jugger
+ name: jugger
+ description: "authenticated juggers"
+ authorities:
+ - *Authority-jugger
+
+- &Group-JUGAdministrator
+ name: JUG administrators
+ description: "trusted juggers"
+ authorities:
+ - *Authority-jugger
+ - *Authority-juggerAdmin
+
+- &Group-administrator
+ name: administrator
+ description: "administrators"
+ authorities:
+ - *Authority-admin
+
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/JUG.yml Sat May
25 17:49:36 2013
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &JUG-Padova
+ name: JUG Padova
+ country: *Country-IT
+ webSite:
http://www.jugpadova.it
+ latitude: 11.89364
+ longitude: 45.40945
+ infos: Leader <a href="mailto:
lucio.b...@jugpadova.it">Lucio
Benfante</a> (<a href="
http://www.jugpadova.it">site</a>)
+- &JUG-Sardegna
+ name: JUG Sardegna
+ country: *Country-IT
+ webSite:
http://www.jugsardegna.org
+ latitude: 0
+ longitude: 0
+- &JUG-GOJAVA
+ name: GOJAVA
+ country: *Country-BR
+ webSite:
www.gojava.org
+ latitude: -16.666921744733
+ longitude: -49.269009502375
+ infos: Grupo de Usuários JAVA Estado de Goiás
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Jugger.yml Sat
May 25 17:49:36 2013
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Jugger-lucio
+ firstName: Lucio
+ lastName: Benfante
+ email:
lucio.b...@jugpadova.it
+ jug: *JUG-Padova
+ user: *User-lucio
+
+
+- &Jugger-fabrizio
+ firstName: Fabrizio
+ lastName: Gianneschi
+ email:
fabr...@gianneschi.it
+ jug: *JUG-Sardegna
+ user: *User-fabrizio
+
+- &Jugger-enrico
+ firstName: Enrico
+ lastName: Giurin
+ email:
enrico...@gmail.com
+ jug: *JUG-Padova
+ user: *User-enrico
+
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Participant.yml
Sat May 25 17:49:36 2013
@@ -0,0 +1,142 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Participant-FutureLucio
+ firstName: "Lucio"
+ lastName: "Benfante"
+ email: "
lucio.b...@jugpadova.it"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: true
+- &Participant-FutureRossi
+ firstName: "Mario"
+ lastName: "Rossi"
+ email: "
mario...@example.net"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ cancelled: false
+ reminderEnabled: true
+- &Participant-FutureRossi2
+ firstName: "Mario"
+ lastName: "Rossi2"
+ email: "
mario....@example.net"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ cancelled: true
+ reminderEnabled: false
+- &Participant-FutureRossi3
+ firstName: "Mario"
+ lastName: "Rossi3"
+ email: "
mario....@example.net"
+ confirmed: false
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: false
+- &Participant-FutureRossi3bis
+ firstName: "Mario"
+ lastName: "Rossi3bis"
+ email: "
mario....@example.net"
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: false
+- &Participant-FutureRossi4
+ firstName: "Mario"
+ lastName: "Rossi4"
+ email: "
mario....@example.net"
+ confirmed: false
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ cancelled: true
+ reminderEnabled: false
+- &Participant-FutureLucio2
+ firstName: "Lucio2"
+ lastName: "Benfante"
+ email: "
lucio.b...@jugpadova.it"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: false
+- &Participant-FutureLucio3
+ firstName: "Lucio3"
+ lastName: "Benfante"
+ email: "
lucio.b...@jugpadova.it"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: false
+- &Participant-FutureLucio4
+ firstName: "Lucio4"
+ lastName: "Benfante"
+ email: "
lucio.b...@jugpadova.it"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: false
+- &Participant-FutureLucio5
+ firstName: "Lucio5"
+ lastName: "Benfante"
+ email: "
lucio.b...@jugpadova.it"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: false
+- &Participant-FutureLucio6
+ firstName: "Lucio6"
+ lastName: "Benfante"
+ email: "
lucio.b...@jugpadova.it"
+ confirmed: true
+ event: *Event-future
+ creationDate: 2007-02-17
+ attended: false
+ confirmationDate: 2007-02-17
+ winner: false
+ reminderEnabled: false
+
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/Speaker.yml Sat
May 25 17:49:36 2013
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &Speaker-EnricoGiurinSpringframework
+ resume: Enrico Giurin is an electronic engineer working as software
engineer since 1999
+ firstName: Enrico
+ lastName: Giurin
+ email:
enrico...@gmail.com
+ url:
http://enricogi.blogspot.com/
+ skypeId: enricogiurin
+ event: *Event-springframework
+
+- &Speaker-LucioBenfanteSpringframework
+ resume: Lucio Benfante is the president of the JUG Padova
+ firstName: Lucio
+ lastName: Benfante
+ email:
lucio.b...@jugpadova.it
+ url:
http://benfante.blogspot.com/
+ skypeId: benfante
+ event: *Event-springframework
+
+- &Speaker-LucioBenfanteJugpdnov
+ resume: Lucio Benfante è il presidente del JUG Padova e
responsabile di jugevents.
+ firstName: Lucio
+ lastName: Benfante
+ email:
lucio.b...@jugpadova.it
+ url:
http://benfante.blogspot.com/
+ skypeId: benfante
+ event: *Event-jugpdnov
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/fixtures/User.yml Sat May
25 17:49:36 2013
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
+#
+# This file is part of JUG Events - Core.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- &User-admin
+ username: admin
+ password: ceb4f32325eda6142bd65215f4c0f371
+ enabled: true
+ locked: false
+ groups:
+ - *Group-administrator
+
+- &User-lucio
+ username: lucio
+ password: 362cbb563f8587377f3e9bfc3832b2f3
+ enabled: true
+ locked: false
+ groups:
+ - *Group-jugger
+
+- &User-fabrizio
+ username: fabrizio
+ password: 2e5664873121b0e336e3b969dbe98a3
+ enabled: true
+ locked: false
+ groups:
+ - *Group-jugger
+
+- &User-enrico
+ username: enrico
+ password: 6a284f80d6934f5af4addf7689b7e4f5
+ enabled: true
+ locked: false
+ groups:
+ - *Group-jugger
+ - *Group-administrator
=======================================
--- /dev/null
+++ /jugevents/jugevents-core/src/test/resources/images/enrico.jpg Sat May
25 17:49:36 2013
Binary file, no diff available.
=======================================
--- /jugevents/jugevents-web/src/main/java/it/jugpadova/Conf.java Thu Mar
31 09:40:30 2011
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package it.jugpadova;
-
-import org.parancoe.util.BaseConf;
-
-/**
- * here you can put configuration specific getters
- */
-public class Conf extends BaseConf {
-
- public String getMyParam() {
- return getConfiguration().getString("myparam");
- }
-
- public String getAnalyticsKey() {
- return getConfiguration().getString("analyticsKey");
- }
-
- public String getJugeventsBaseUrl() {
- return getConfiguration().getString("jugeventsBaseUrl");
- }
-
- public String getConfirmationSenderEmailAddress() {
- return
getConfiguration().getString("confirmationSenderEmailAddress");
- }
-
- public int getUpcomingEventDays() {
- return getConfiguration().getInt("upcomingEventDays", 7);
- }
-
- public int getNewEventDays() {
- return getConfiguration().getInt("newEventDays", 7);
- }
-
- public String getDefaultKmlUrl() {
- return getConfiguration().getString("defaultKmlUrl");
- }
-
- public double getThresholdAccess() {
- return getConfiguration().getDouble("thresholdAccess", 1);
- }
-
- public String getAdminMailJE() {
- return getConfiguration().getString("adminMailJE");
- }
-
- public String getKmlUpdateFromAddress() {
- return getConfiguration().getString("kmlUpdateFromAddress");
- }
-
- public String getKmlUpdateToAddress() {
- return getConfiguration().getString("kmlUpdateToAddress");
- }
-
- public String getKmlUpdateReplyAddress() {
- return getConfiguration().getString("kmlUpdateReplyAddress");
- }
-
- public String getKmlUpdateSubjectPrefix() {
- return getConfiguration().getString("kmlUpdateSubjectPrefix");
- }
-
- public String getInternalMail() {
- return getConfiguration().getString("internalMail");
- }
-}
=======================================
--- /jugevents/jugevents-web/src/main/java/it/jugpadova/JugEventsDaos.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package it.jugpadova;
-
-
-import org.jugevents.core.dao.ArchiveVideoResourceDao;
-import org.jugevents.core.dao.EventDao;
-import org.jugevents.core.dao.EventLinkDao;
-import org.jugevents.core.dao.EventResourceDao;
-import org.jugevents.core.dao.FlickrResourceDao;
-import org.jugevents.core.dao.JUGDao;
-import org.jugevents.core.dao.JuggerDao;
-import org.jugevents.core.dao.ParticipantDao;
-import org.jugevents.core.dao.SlideShareResourceDao;
-import org.jugevents.core.dao.YouTubeResourceDao;
-import org.lambico.dao.Daos;
-import org.parancoe.plugins.securityevolution.AuthorityDao;
-import org.parancoe.plugins.securityevolution.UserDao;
-import org.parancoe.plugins.world.ContinentDao;
-import org.parancoe.plugins.world.CountryDao;
-
-/**
- * Interface for the DAO Provider. Doesn't require an implementation.
Simply add
- * methods for the DAOs you need to use. The convention for the methods is
get<dao_bean_id>.
- */
-public interface JugEventsDaos extends Daos {
-
- public EventDao getEventDao();
-
- public ParticipantDao getParticipantDao();
-
- public JuggerDao getJuggerDao();
-
- public UserDao getUserDao();
-
- public AuthorityDao getAuthorityDao();
-
- public CountryDao getCountryDao();
-
- public ContinentDao getContinentDao();
-
- public JUGDao getJUGDao();
-
-
-
- public EventResourceDao getEventResourceDao();
-
- public EventLinkDao getEventLinkDao();
-
- public SlideShareResourceDao getSlideShareResourceDao();
-
- public FlickrResourceDao getFlickrResourceDao();
-
- public ArchiveVideoResourceDao getArchiveVideoResourceDao();
-
- public YouTubeResourceDao getYouTubeResourceDao();
-}
=======================================
--- /jugevents/jugevents-web/src/main/resources/images/enrico.jpg Wed Mar
30 08:34:27 2011
+++ /dev/null
Binary file, no diff available.
=======================================
---
/jugevents/jugevents-web/src/test/java/it/jugpadova/JugEventsBaseTest.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package it.jugpadova;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import org.apache.commons.io.IOUtils;
-import org.jugevents.core.po.Event;
-import org.jugevents.core.po.EventLink;
-import org.jugevents.core.po.JUG;
-import org.jugevents.core.po.Jugger;
-import org.jugevents.core.po.Participant;
-import org.jugevents.core.po.Speaker;
-import org.lambico.test.spring.hibernate.junit4.FixtureSet;
-import org.parancoe.plugins.securityevolution.Authority;
-import org.parancoe.plugins.securityevolution.Group;
-import org.parancoe.plugins.securityevolution.User;
-import org.parancoe.plugins.world.Continent;
-import org.parancoe.plugins.world.Country;
-import org.parancoe.web.test.junit4.AbstractWebTest;
-
-/**
- * Base test class for test of JUG Events.
- *
- * @author lucio
- */
-@FixtureSet(modelClasses = {Continent.class, Country.class,
Authority.class, Group.class, User.class,
- JUG.class, Jugger.class, Event.class, EventLink.class,
Participant.class, Speaker.class})
-public abstract class JugEventsBaseTest extends AbstractWebTest {
-
- protected void writeTestFile(String prefix, String suffix, byte[]
bytes) throws IOException {
- final File tempFile = File.createTempFile(prefix, suffix);
- OutputStream out = null;
- try {
- out = new FileOutputStream(tempFile);
- out.write(bytes);
- out.flush();
-
logger.info("Wrote test file " + tempFile.getAbsolutePath());
- } finally {
- IOUtils.closeQuietly(out);
- }
- }
-}
=======================================
---
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/EventDaoTest.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package it.jugpadova.dao;
-
-import it.jugpadova.JugEventsBaseTest;
-import java.util.List;
-import javax.annotation.Resource;
-import static org.hamcrest.collection.IsCollectionWithSize.*;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.jugevents.core.dao.EventDao;
-import org.jugevents.core.po.Event;
-import org.jugevents.core.po.Speaker;
-import org.junit.Test;
-
-/**
- * @author Enrico Giurin
- *
- */
-public class EventDaoTest extends JugEventsBaseTest {
-
- @Resource
- private EventDao eventDao;
-
- @Test
- public void findByTitle() {
- List<Event> events = eventDao.findByTitle("Springframework%");
- assertThat(events, hasSize(1));
- Event eventSF = events.get(0);
- List<Speaker> speakers = eventSF.getSpeakers();
- assertThat(speakers, hasSize(2));
- }
-}
=======================================
---
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/EventResourceDaoTest.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package it.jugpadova.dao;
-
-import it.jugpadova.JugEventsBaseTest;
-import java.util.List;
-import javax.annotation.Resource;
-import static org.hamcrest.collection.IsCollectionWithSize.*;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.jugevents.core.dao.EventResourceDao;
-import org.jugevents.core.po.EventResource;
-import org.junit.Test;
-
-/**
- *
- * @author lucio
- */
-public class EventResourceDaoTest extends JugEventsBaseTest {
-
- @Resource
- private EventResourceDao eventResourceDao;
-
- @Test
- public void findAll() {
- List<EventResource> resources = eventResourceDao.findAll();
- assertThat(resources, hasSize(7));
- }
-}
=======================================
--- /jugevents/jugevents-web/src/test/java/it/jugpadova/dao/JUGDaoTest.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package it.jugpadova.dao;
-
-import it.jugpadova.JugEventsBaseTest;
-import java.util.List;
-import javax.annotation.Resource;
-import static org.hamcrest.CoreMatchers.*;
-import static org.hamcrest.collection.IsCollectionWithSize.*;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.jugevents.core.dao.JUGDao;
-import org.jugevents.core.po.JUG;
-import org.junit.Test;
-
-/**
- *
- * @author Enrico Giurin
- */
-public class JUGDaoTest extends JugEventsBaseTest {
-
- @Resource
- private JUGDao jugDao;
-
- @Test
- public void findByPartialName() {
- List<JUG> jugs = jugDao.findByPartialName("%J%");
- assertThat(jugs, hasSize(3));
- }
-
- @Test
- public void findByPartialJugNameAndCountry() {
- List<JUG> jugs =
jugDao.findByPartialJugNameAndCountry("J%", "It%");
- assertThat(jugs, hasSize(2));
- }
-
- @Test
- public void findByNameAndCountryEN() {
- List<JUG> jugs = jugDao.findByNameAndCountryEN("JUG
Padova", "Italy");
- assertThat(jugs, hasSize(1));
- }
-
- @Test
- public void findByICName() {
- JUG jug = jugDao.findByICName("jug padova");
- assertThat(jug, is(notNullValue()));
- assertThat(jug.getName(), is(equalTo("JUG Padova")));
- }
-}
=======================================
---
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/JuggerDaoTest.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package it.jugpadova.dao;
-
-import it.jugpadova.JugEventsBaseTest;
-import java.util.List;
-import javax.annotation.Resource;
-import static org.hamcrest.collection.IsCollectionWithSize.*;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.jugevents.core.dao.JuggerDao;
-import org.jugevents.core.po.Jugger;
-import org.junit.Test;
-
-/**
- *
- * @author lucio
- */
-public class JuggerDaoTest extends JugEventsBaseTest {
-
- @Resource
- private JuggerDao juggerDao;
-
- @Test
- public void findByPartialJugNameAndCountryAndContinent() {
- List<Jugger> juggers =
juggerDao.findByPartialJugNameAndCountryAndContinent("%J%", "%Ital%",
- "%Eur%");
- assertThat(juggers, hasSize(3));
- }
-
- @Test
- public void findAll() {
- List<Jugger> juggers = juggerDao.findAll();
- assertThat(juggers, hasSize(3));
- }
-}
=======================================
---
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/ParticipantDaoTest.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package it.jugpadova.dao;
-
-import it.jugpadova.JugEventsBaseTest;
-import java.util.List;
-import javax.annotation.Resource;
-import static org.hamcrest.collection.IsCollectionWithSize.*;
-import static org.hamcrest.CoreMatchers.*;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.jugevents.core.dao.EventDao;
-import org.jugevents.core.dao.ParticipantDao;
-import org.jugevents.core.po.Event;
-import org.jugevents.core.po.Participant;
-import org.junit.Test;
-
-/**
- * Tests on the ParticipantDao methods (and queries)
- *
- * @author Lucio Benfante
- */
-public class ParticipantDaoTest extends JugEventsBaseTest {
-
- @Resource
- private ParticipantDao participantDao;
- @Resource
- private EventDao eventDao;
-
- /**
- * Test of findConfirmedParticipantsByEventId method, of class
ParticipantDao.
- */
- @Test
- public void findConfirmedParticipantsByEventId() {
- List<Event> futureEvent = retrieveFutureEvent();
- List<Participant> participants =
-
participantDao.findConfirmedParticipantsByEventId(futureEvent.
- get(0).getId());
- assertThat(participants, hasSize(7));
- }
-
- /**
- * Test of findNotConfirmedParticipantsByEventId method, of class
ParticipantDao.
- */
- @Test
- public void findNotConfirmedParticipantsByEventId() {
- List<Event> futureEvent = retrieveFutureEvent();
- List<Participant> participants =
-
participantDao.findNotConfirmedParticipantsByEventId(futureEvent.get(0).
- getId());
- assertThat(participants, hasSize(2));
- }
-
- /**
- * Test of findCancelledParticipantsByEventId method, of class
ParticipantDao.
- */
- @Test
- public void findCancelledParticipantsByEventId() {
- List<Event> futureEvent = retrieveFutureEvent();
- List<Participant> participants = participantDao.
-
findCancelledParticipantsByEventId(futureEvent.get(0).getId());
- assertThat(participants, hasSize(2));
- }
-
- /**
- * Test the consistency of the lists of participants.
- *
- */
- @Test
- public void participantListsConsistency() {
- List<Event> futureEvent = retrieveFutureEvent();
- Long eventId = futureEvent.get(0).getId();
- List<Participant> all =
participantDao.findParticipantsByEventId(eventId);
- List<Participant> confirmed =
- participantDao.findConfirmedParticipantsByEventId(eventId);
- List<Participant> notConfirmed =
-
participantDao.findNotConfirmedParticipantsByEventId(eventId);
- List<Participant> cancelled = participantDao.
- findCancelledParticipantsByEventId(eventId);
- assertThat(all.size(),
- is(equalTo(confirmed.size() + notConfirmed.size() +
cancelled.size())));
- }
-
- private List<Event> retrieveFutureEvent() {
- List<Event> futureEvent = eventDao.findByTitle("Future Meeting");
- assertThat(futureEvent, hasSize(1));
- return futureEvent;
- }
-}
=======================================
---
/jugevents/jugevents-web/src/test/java/it/jugpadova/dao/SpeakerDaoTest.java
Fri May 24 23:13:01 2013
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
- *
- * This file is part of JUG Events Web Application.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package it.jugpadova.dao;
-
-import it.jugpadova.JugEventsBaseTest;
-import it.jugpadova.util.Utilities;
-import java.util.List;
-import javax.annotation.Resource;
-import static org.hamcrest.collection.IsCollectionWithSize.*;
-import static org.hamcrest.CoreMatchers.*;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.jugevents.core.dao.SpeakerDao;
-import org.jugevents.core.po.Event;
-import org.jugevents.core.po.Speaker;
-import org.junit.Test;
-
-/**
- * @author Enrico Giurin
- *
- */
-public class SpeakerDaoTest extends JugEventsBaseTest {
-
- @Resource
- private SpeakerDao speakerDao;
-
- @Test
- public void findAll() {
- List<Speaker> speakers = speakerDao.findAll();
- assertThat(speakers, hasSize(3));
- }
-
- @Test
- public void findEventsByPartialSpeakerEmail() {
- List<Event> events =
speakerDao.findEventsByPartialSpeakerEmail("lucio%");
- assertThat(events, hasSize(2));
- }
-
- @Test
- public void findSpeakersByPartialEventTitle() {
- List<Speaker> speakers =
speakerDao.findSpeakersByPartialEventTitle("Springframework%");
- assertThat(speakers, hasSize(2));
- Speaker speakerLucio = speakerDao.findByResume("%is the
president%").get(0);
- Speaker speakerEnrico = speakerDao.findByResume("%electronic
engineer%").get(0);
- assertThat(speakers.contains(speakerLucio), is(true));
- assertThat(speakers.contains(speakerEnrico), is(true));
- assertThat(speakerEnrico.getEmail(),
is(equalTo("
enrico...@gmail.com")));
- assertThat(speakerLucio.getUrl(),
is(equalTo("
http://benfante.blogspot.com/")));
- assertThat(speakerLucio.getSkypeId(), is(equalTo("benfante")));
- }
-
-// @Test
-// public void insertDuplicateKey() {
-// SpeakerCoreAttributes duplicateSpeaker = new
SpeakerCoreAttributes("enrico", "giurin", "
a...@bbb.com");
-// //I was expecting this method would throw an exception, not only
logging the error
-// speakerCoreAttributesDao.store(duplicateSpeaker);
-// TODO I cannot check any results as I have an hibernate exception
-// assertThat(1,
speakerCoreAttributesDao.findByFirstNameAndLastName("enrico",is(equalTo( "giurin").size())));
-// TODO check why the method findAll returns null...
-// assertThat(2,is(equalTo(
speakerCoreAttributesDao.findAll().size())));
-// }
-
- @Test
- public void insertImage() throws Exception {
- byte[] image = Utilities.resourceToBytes("/images/enrico.jpg");
- assertThat(image.length, is(2402));
- Speaker speakerEnrico = speakerDao.findByResume("%electronic
engineer%").get(0);
- speakerEnrico.setPicture(image);
- speakerDao.store(speakerEnrico);
- }
-}
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Authority.yml Sun
Feb 24 15:52:36 2013
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Authority-admin
- role: ROLE_ADMIN
-- &Authority-juggerAdmin
- role: ROLE_JUGGER_ADMIN
-- &Authority-jugger
- role: ROLE_JUGGER
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Continent.yml Thu
Mar 31 08:27:26 2011
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Continent-NorthAmerica
- name: "North America"
-- &Continent-SouthAmerica
- name: "South America"
-- &Continent-Antarctica
- name: "Antarctica"
-- &Continent-Africa
- name: "Africa"
-- &Continent-Europe
- name: "Europe"
-- &Continent-Asia
- name: "Asia"
-- &Continent-Australia
- name: "Australia"
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Country.yml Thu
Mar 31 08:27:26 2011
+++ /dev/null
@@ -1,627 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Country-AE
- isoCode: AE
- languageIsoCode: ar
- languageVariant: null
- localName: الإمارات
- englishName: United Arab Emirates
- continent: *Continent-Asia
-- &Country-AL
- isoCode: AL
- languageIsoCode: sq
- languageVariant: null
- localName: Shqipëria
- englishName: Albania
- continent: *Continent-Europe
-- &Country-AR
- isoCode: AR
- languageIsoCode: es
- languageVariant: null
- localName: Argentina
- englishName: Argentina
- continent: *Continent-SouthAmerica
-- &Country-AT
- isoCode: AT
- languageIsoCode: de
- languageVariant: null
- localName: Österreich
- englishName: Austria
- continent: *Continent-Europe
-- &Country-AU
- isoCode: AU
- languageIsoCode: en
- languageVariant: null
- localName: Australia
- englishName: Australia
- continent: *Continent-Australia
-- &Country-BA
- isoCode: BA
- languageIsoCode: sr
- languageVariant: null
- localName: Босна и Херцеговина
- englishName: Bosnia and Herzegovina
- continent: *Continent-Europe
-- &Country-BE
- isoCode: BE
- languageIsoCode: fr
- languageVariant: null
- localName: Belgique
- englishName: Belgium
- continent: *Continent-Europe
-- &Country-BG
- isoCode: BG
- languageIsoCode: bg
- languageVariant: null
- localName: България
- englishName: Bulgaria
- continent: *Continent-Europe
-- &Country-BH
- isoCode: BH
- languageIsoCode: ar
- languageVariant: null
- localName: البحرين
- englishName: Bahrain
- continent: *Continent-Asia
-- &Country-BO
- isoCode: BO
- languageIsoCode: es
- languageVariant: null
- localName: Bolivia
- englishName: Bolivia
- continent: *Continent-SouthAmerica
-- &Country-BR
- isoCode: BR
- languageIsoCode: pt
- languageVariant: null
- localName: Brasil
- englishName: Brazil
- continent: *Continent-SouthAmerica
-- &Country-BY
- isoCode: BY
- languageIsoCode: be
- languageVariant: null
- localName: Беларусь
- englishName: Belarus
- continent: *Continent-Europe
-- &Country-CA
- isoCode: CA
- languageIsoCode: en
- languageVariant: null
- localName: Canada
- englishName: Canada
- continent: *Continent-NorthAmerica
-- &Country-CH
- isoCode: CH
- languageIsoCode: de
- languageVariant: null
- localName: Schweiz
- englishName: Switzerland
- continent: *Continent-Europe
-- &Country-CL
- isoCode: CL
- languageIsoCode: es
- languageVariant: null
- localName: Chile
- englishName: Chile
- continent: *Continent-SouthAmerica
-- &Country-CN
- isoCode: CN
- languageIsoCode: zh
- languageVariant: null
- localName: 中国
- englishName: China
- continent: *Continent-Asia
-- &Country-CO
- isoCode: CO
- languageIsoCode: es
- languageVariant: null
- localName: Colombia
- englishName: Colombia
- continent: *Continent-SouthAmerica
-- &Country-CR
- isoCode: CR
- languageIsoCode: es
- languageVariant: null
- localName: Costa Rica
- englishName: Costa Rica
- continent: *Continent-SouthAmerica
-- &Country-CS
- isoCode: CS
- languageIsoCode: sr
- languageVariant: null
- localName: Србија и Црна Гора
- englishName: Serbia and Montenegro
- continent: *Continent-Europe
-- &Country-CZ
- isoCode: CZ
- languageIsoCode: cs
- languageVariant: null
- localName: Česká republika
- englishName: Czech Republic
- continent: *Continent-Europe
-- &Country-DE
- isoCode: DE
- languageIsoCode: de
- languageVariant: null
- localName: Deutschland
- englishName: Germany
- continent: *Continent-Europe
-- &Country-DK
- isoCode: DK
- languageIsoCode: da
- languageVariant: null
- localName: Danmark
- englishName: Denmark
- continent: *Continent-Europe
-- &Country-DO
- isoCode: DO
- languageIsoCode: es
- languageVariant: null
- localName: República Dominicana
- englishName: Dominican Republic
- continent: *Continent-SouthAmerica
-- &Country-DZ
- isoCode: DZ
- languageIsoCode: ar
- languageVariant: null
- localName: الجزائر
- englishName: Algeria
- continent: *Continent-Africa
-- &Country-EC
- isoCode: EC
- languageIsoCode: es
- languageVariant: null
- localName: Ecuador
- englishName: Ecuador
- continent: *Continent-SouthAmerica
-- &Country-EE
- isoCode: EE
- languageIsoCode: et
- languageVariant: null
- localName: Eesti
- englishName: Estonia
- continent: *Continent-Europe
-- &Country-EG
- isoCode: EG
- languageIsoCode: ar
- languageVariant: null
- localName: مصر
- englishName: Egypt
- continent: *Continent-Africa
-- &Country-ES
- isoCode: ES
- languageIsoCode: es
- languageVariant: null
- localName: España
- englishName: Spain
- continent: *Continent-Europe
-- &Country-FI
- isoCode: FI
- languageIsoCode: fi
- languageVariant: null
- localName: Suomi
- englishName: Finland
- continent: *Continent-Europe
-- &Country-FR
- isoCode: FR
- languageIsoCode: fr
- languageVariant: null
- localName: France
- englishName: France
- continent: *Continent-Europe
-- &Country-GB
- isoCode: GB
- languageIsoCode: en
- languageVariant: null
- localName: United Kingdom
- englishName: United Kingdom
- continent: *Continent-Europe
-- &Country-GR
- isoCode: GR
- languageIsoCode: el
- languageVariant: null
- localName: Ελλάδα
- englishName: Greece
- continent: *Continent-Europe
-- &Country-GT
- isoCode: GT
- languageIsoCode: es
- languageVariant: null
- localName: Guatemala
- englishName: Guatemala
- continent: *Continent-SouthAmerica
-- &Country-HK
- isoCode: HK
- languageIsoCode: zh
- languageVariant: null
- localName: 香港
- englishName: Hong Kong
- continent: *Continent-Asia
-- &Country-HN
- isoCode: HN
- languageIsoCode: es
- languageVariant: null
- localName: Honduras
- englishName: Honduras
- continent: *Continent-SouthAmerica
-- &Country-HR
- isoCode: HR
- languageIsoCode: hr
- languageVariant: null
- localName: Hrvatska
- englishName: Croatia
- continent: *Continent-Europe
-- &Country-HU
- isoCode: HU
- languageIsoCode: hu
- languageVariant: null
- localName: Magyarország
- englishName: Hungary
- continent: *Continent-Europe
-- &Country-IE
- isoCode: IE
- languageIsoCode: en
- languageVariant: null
- localName: Ireland
- englishName: Ireland
- continent: *Continent-Europe
-- &Country-IL
- isoCode: IL
- languageIsoCode: iw
- languageVariant: null
- localName: ישראל
- englishName: Israel
- continent: *Continent-Asia
-- &Country-IN
- isoCode: IN
- languageIsoCode: hi
- languageVariant: null
- localName: भारत
- englishName: India
- continent: *Continent-Asia
-- &Country-IQ
- isoCode: IQ
- languageIsoCode: ar
- languageVariant: null
- localName: العراق
- englishName: Iraq
- continent: *Continent-Asia
-- &Country-IS
- isoCode: IS
- languageIsoCode: is
- languageVariant: null
- localName: Ísland
- englishName: Iceland
- continent: *Continent-Europe
-- &Country-IT
- isoCode: IT
- languageIsoCode: it
- languageVariant: null
- localName: Italia
- englishName: Italy
- continent: *Continent-Europe
-- &Country-JO
- isoCode: JO
- languageIsoCode: ar
- languageVariant: null
- localName: الأردن
- englishName: Jordan
- continent: *Continent-Asia
-- &Country-JP
- isoCode: JP
- languageIsoCode: ja
- languageVariant: null
- localName: 日本
- englishName: Japan
- continent: *Continent-Asia
-- &Country-KR
- isoCode: KR
- languageIsoCode: ko
- languageVariant: null
- localName: 대한민국
- englishName: South Korea
- continent: *Continent-Asia
-- &Country-KW
- isoCode: KW
- languageIsoCode: ar
- languageVariant: null
- localName: الكويت
- englishName: Kuwait
- continent: *Continent-Asia
-- &Country-LB
- isoCode: LB
- languageIsoCode: ar
- languageVariant: null
- localName: لبنان
- englishName: Lebanon
- continent: *Continent-Asia
-- &Country-LT
- isoCode: LT
- languageIsoCode: lt
- languageVariant: null
- localName: Lietuva
- englishName: Lithuania
- continent: *Continent-Europe
-- &Country-LU
- isoCode: LU
- languageIsoCode: fr
- languageVariant: null
- localName: Luxembourg
- englishName: Luxembourg
- continent: *Continent-Europe
-- &Country-LV
- isoCode: LV
- languageIsoCode: lv
- languageVariant: null
- localName: Latvija
- englishName: Latvia
- continent: *Continent-Europe
-- &Country-LY
- isoCode: LY
- languageIsoCode: ar
- languageVariant: null
- localName: ليبيا
- englishName: Libya
- continent: *Continent-Africa
-- &Country-MA
- isoCode: MA
- languageIsoCode: ar
- languageVariant: null
- localName: المغرب
- englishName: Morocco
- continent: *Continent-Africa
-- &Country-MK
- isoCode: MK
- languageIsoCode: mk
- languageVariant: null
- localName: Македонија
- englishName: Macedonia
- continent: *Continent-Europe
-- &Country-MX
- isoCode: MX
- languageIsoCode: es
- languageVariant: null
- localName: México
- englishName: Mexico
- continent: *Continent-SouthAmerica
-- &Country-NI
- isoCode: NI
- languageIsoCode: es
- languageVariant: null
- localName: Nicaragua
- englishName: Nicaragua
- continent: *Continent-SouthAmerica
-- &Country-NL
- isoCode: NL
- languageIsoCode: nl
- languageVariant: null
- localName: Nederland
- englishName: Netherlands
- continent: *Continent-Europe
-- &Country-NO
- isoCode: NO
- languageIsoCode: no
- languageVariant: null
- localName: Norge
- englishName: Norway
- continent: *Continent-Europe
-- &Country-NZ
- isoCode: NZ
- languageIsoCode: en
- languageVariant: null
- localName: New Zealand
- englishName: New Zealand
- continent: *Continent-Asia
-- &Country-OM
- isoCode: OM
- languageIsoCode: ar
- languageVariant: null
- localName: سلطنة عمان
- englishName: Oman
- continent: *Continent-Asia
-- &Country-PA
- isoCode: PA
- languageIsoCode: es
- languageVariant: null
- localName: Panamá
- englishName: Panama
- continent: *Continent-SouthAmerica
-- &Country-PE
- isoCode: PE
- languageIsoCode: es
- languageVariant: null
- localName: Perú
- englishName: Peru
- continent: *Continent-SouthAmerica
-- &Country-PL
- isoCode: PL
- languageIsoCode: pl
- languageVariant: null
- localName: Polska
- englishName: Poland
- continent: *Continent-Europe
-- &Country-PR
- isoCode: PR
- languageIsoCode: es
- languageVariant: null
- localName: Puerto Rico
- englishName: Puerto Rico
- continent: *Continent-SouthAmerica
-- &Country-PT
- isoCode: PT
- languageIsoCode: pt
- languageVariant: null
- localName: Portugal
- englishName: Portugal
- continent: *Continent-Europe
-- &Country-PY
- isoCode: PY
- languageIsoCode: es
- languageVariant: null
- localName: Paraguay
- englishName: Paraguay
- continent: *Continent-SouthAmerica
-- &Country-QA
- isoCode: QA
- languageIsoCode: ar
- languageVariant: null
- localName: قطر
- englishName: Qatar
- continent: *Continent-Asia
-- &Country-RO
- isoCode: RO
- languageIsoCode: ro
- languageVariant: null
- localName: România
- englishName: Romania
- continent: *Continent-Europe
-- &Country-RU
- isoCode: RU
- languageIsoCode: ru
- languageVariant: null
- localName: Россия
- englishName: Russia
- continent: *Continent-Europe
-- &Country-SA
- isoCode: SA
- languageIsoCode: ar
- languageVariant: null
- localName: السعودية
- englishName: Saudi Arabia
- continent: *Continent-Asia
-- &Country-SD
- isoCode: SD
- languageIsoCode: ar
- languageVariant: null
- localName: السودان
- englishName: Sudan
- continent: *Continent-Africa
-- &Country-SE
- isoCode: SE
- languageIsoCode: sv
- languageVariant: null
- localName: Sverige
- englishName: Sweden
- continent: *Continent-Europe
-- &Country-SI
- isoCode: SI
- languageIsoCode: sl
- languageVariant: null
- localName: Slovenija
- englishName: Slovenia
- continent: *Continent-Europe
-- &Country-SK
- isoCode: SK
- languageIsoCode: sk
- languageVariant: null
- localName: Slovenská republika
- englishName: Slovakia
- continent: *Continent-Europe
-- &Country-SV
- isoCode: SV
- languageIsoCode: es
- languageVariant: null
- localName: El Salvador
- englishName: El Salvador
- continent: *Continent-SouthAmerica
-- &Country-SY
- isoCode: SY
- languageIsoCode: ar
- languageVariant: null
- localName: سوريا
- englishName: Syria
- continent: *Continent-Asia
-- &Country-TH
- isoCode: TH
- languageIsoCode: th
- languageVariant: null
- localName: ประเทศไทย
- englishName: Thailand
- continent: *Continent-Asia
-- &Country-TN
- isoCode: TN
- languageIsoCode: ar
- languageVariant: null
- localName: تونس
- englishName: Tunisia
- continent: *Continent-Africa
-- &Country-TR
- isoCode: TR
- languageIsoCode: tr
- languageVariant: null
- localName: Türkiye
- englishName: Turkey
- continent: *Continent-Asia
-- &Country-TW
- isoCode: TW
- languageIsoCode: zh
- languageVariant: null
- localName: 台灣
- englishName: Taiwan
- continent: *Continent-Asia
-- &Country-UA
- isoCode: UA
- languageIsoCode: uk
- languageVariant: null
- localName: Україна
- englishName: Ukraine
- continent: *Continent-Europe
-- &Country-US
- isoCode: US
- languageIsoCode: en
- languageVariant: null
- localName: United States
- englishName: United States
- continent: *Continent-NorthAmerica
-- &Country-UY
- isoCode: UY
- languageIsoCode: es
- languageVariant: null
- localName: Uruguay
- englishName: Uruguay
- continent: *Continent-SouthAmerica
-- &Country-VE
- isoCode: VE
- languageIsoCode: es
- languageVariant: null
- localName: Venezuela
- englishName: Venezuela
- continent: *Continent-SouthAmerica
-- &Country-VN
- isoCode: VN
- languageIsoCode: vi
- languageVariant: null
- localName: Việt Nam
- englishName: Vietnam
- continent: *Continent-Asia
-- &Country-YE
- isoCode: YE
- languageIsoCode: ar
- languageVariant: null
- localName: اليمن
- englishName: Yemen
- continent: *Continent-SouthAmerica
-- &Country-ZA
- isoCode: ZA
- languageIsoCode: en
- languageVariant: null
- localName: South Africa
- englishName: South Africa
- continent: *Continent-Africa
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Event.yml Tue Apr
16 18:38:46 2013
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Event-springframework
- title: "Springframework Meeting 2007"
- creationDate: 2007-01-01
- startDate: 2007-07-14
- startTime: "09:00 AM"
- endDate: 2007-07-14
- endTime: "02:00 PM"
- location: DIEE
- directions: "Aule B0 e B1"
- description: "Lo Spring Framework Italian User Group in collaborazione
con il Java User Group Sardegna Onlus e il DIEE ha organizzato il primo
Spring Meeting del 2007"
- filter: Textile
- jugOwner: *JUG-Sardegna
-- &Event-jugpdnov
- title: "JUG Padova Meeting #38"
- creationDate: 2007-01-01
- startDate: 2007-11-24
- startTime: "09:00 AM"
- endDate: 2007-11-24
- endTime: "01:00 PM"
- location: DEI
- directions: "Aula De"
- description: "Meeting di novembre del JUG Padova"
- filter: Textile
- jugOwner: *JUG-Padova
-- &Event-jugpdgiu
- title: "JUG Padova Meeting #39"
- creationDate: 2007-01-01
- startDate: 2008-06-24
- startTime: "09:00 AM"
- endDate: 2008-06-24
- endTime: "01:00 PM"
- location: DEI
- directions: "Aula Ce"
- description: "Meeting di giugno del JUG Padova"
- filter: Textile
- jugOwner: *JUG-Padova
-- &Event-future
- title: "Future Meeting"
- creationDate: 2008-01-01
- startDate: 2020-11-24
- startTime: "09:00 AM"
- endDate: 2020-11-24
- endTime: "01:00 PM"
- location: DEI
- directions: "Aula De"
- description: "Meeting di novembre del JUG Padova"
- filter: Textile
- jugOwner: *JUG-Padova
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/EventLink.yml Tue
Apr 16 18:38:46 2013
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &EventLink-futureEventWebPage
- description: "Web Page of the future event"
- event: *Event-future
- url: "
http://www.jugpadova.it"
-- &EventLink-futureEventSlides01
- description: "Slides of the future event 01"
- event: *Event-future
-
url: "
http://www.jugpadova.it/slides01/very/very/very/very/very/very/long"
-- &EventLink-futureEventSlides02
- description: "Slides of the future event 02"
- event: *Event-future
- url: "
http://www.jugpadova.it/slides02"
-- &EventLink-futureEventSlides03
- description: "Slides of the future event 03"
- event: *Event-future
- url: "
http://www.jugpadova.it/slides03"
-- &EventLink-futureEventSlides04
- description: "Slides of the future event 04"
- event: *Event-future
- url: "
http://www.jugpadova.it/slides04"
-- &EventLink-futureEventSlides05
- description: "Slides of the future event 05"
- event: *Event-future
- url: "
http://www.jugpadova.it/slides05"
-- &EventLink-futureEventSlides06
- description: "Slides of the future event 06"
- event: *Event-future
- url: "
http://www.jugpadova.it/slides06"
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Group.yml Sun Feb
24 15:52:36 2013
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Group-jugger
- name: jugger
- description: "authenticated juggers"
- authorities:
- - *Authority-jugger
-
-- &Group-JUGAdministrator
- name: JUG administrators
- description: "trusted juggers"
- authorities:
- - *Authority-jugger
- - *Authority-juggerAdmin
-
-- &Group-administrator
- name: administrator
- description: "administrators"
- authorities:
- - *Authority-admin
-
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/JUG.yml Tue Apr 16
18:38:46 2013
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &JUG-Padova
- name: JUG Padova
- country: *Country-IT
- webSite:
http://www.jugpadova.it
- latitude: 11.89364
- longitude: 45.40945
- infos: Leader <a href="mailto:
lucio.b...@jugpadova.it">Lucio
Benfante</a> (<a href="
http://www.jugpadova.it">site</a>)
-- &JUG-Sardegna
- name: JUG Sardegna
- country: *Country-IT
- webSite:
http://www.jugsardegna.org
- latitude: 0
- longitude: 0
-- &JUG-GOJAVA
- name: GOJAVA
- country: *Country-BR
- webSite:
www.gojava.org
- latitude: -16.666921744733
- longitude: -49.269009502375
- infos: Grupo de Usuários JAVA Estado de Goiás
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Jugger.yml Sun Feb
24 15:16:13 2013
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Jugger-lucio
- firstName: Lucio
- lastName: Benfante
- email:
lucio.b...@jugpadova.it
- jug: *JUG-Padova
- user: *User-lucio
-
-
-- &Jugger-fabrizio
- firstName: Fabrizio
- lastName: Gianneschi
- email:
fabr...@gianneschi.it
- jug: *JUG-Sardegna
- user: *User-fabrizio
-
-- &Jugger-enrico
- firstName: Enrico
- lastName: Giurin
- email:
enrico...@gmail.com
- jug: *JUG-Padova
- user: *User-enrico
-
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Participant.yml
Tue Apr 16 18:38:46 2013
+++ /dev/null
@@ -1,142 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Participant-FutureLucio
- firstName: "Lucio"
- lastName: "Benfante"
- email: "
lucio.b...@jugpadova.it"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: true
-- &Participant-FutureRossi
- firstName: "Mario"
- lastName: "Rossi"
- email: "
mario...@example.net"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- cancelled: false
- reminderEnabled: true
-- &Participant-FutureRossi2
- firstName: "Mario"
- lastName: "Rossi2"
- email: "
mario....@example.net"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- cancelled: true
- reminderEnabled: false
-- &Participant-FutureRossi3
- firstName: "Mario"
- lastName: "Rossi3"
- email: "
mario....@example.net"
- confirmed: false
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: false
-- &Participant-FutureRossi3bis
- firstName: "Mario"
- lastName: "Rossi3bis"
- email: "
mario....@example.net"
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: false
-- &Participant-FutureRossi4
- firstName: "Mario"
- lastName: "Rossi4"
- email: "
mario....@example.net"
- confirmed: false
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- cancelled: true
- reminderEnabled: false
-- &Participant-FutureLucio2
- firstName: "Lucio2"
- lastName: "Benfante"
- email: "
lucio.b...@jugpadova.it"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: false
-- &Participant-FutureLucio3
- firstName: "Lucio3"
- lastName: "Benfante"
- email: "
lucio.b...@jugpadova.it"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: false
-- &Participant-FutureLucio4
- firstName: "Lucio4"
- lastName: "Benfante"
- email: "
lucio.b...@jugpadova.it"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: false
-- &Participant-FutureLucio5
- firstName: "Lucio5"
- lastName: "Benfante"
- email: "
lucio.b...@jugpadova.it"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: false
-- &Participant-FutureLucio6
- firstName: "Lucio6"
- lastName: "Benfante"
- email: "
lucio.b...@jugpadova.it"
- confirmed: true
- event: *Event-future
- creationDate: 2007-02-17
- attended: false
- confirmationDate: 2007-02-17
- winner: false
- reminderEnabled: false
-
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/Speaker.yml Thu
Mar 31 08:27:26 2011
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &Speaker-EnricoGiurinSpringframework
- resume: Enrico Giurin is an electronic engineer working as software
engineer since 1999
- firstName: Enrico
- lastName: Giurin
- email:
enrico...@gmail.com
- url:
http://enricogi.blogspot.com/
- skypeId: enricogiurin
- event: *Event-springframework
-
-- &Speaker-LucioBenfanteSpringframework
- resume: Lucio Benfante is the president of the JUG Padova
- firstName: Lucio
- lastName: Benfante
- email:
lucio.b...@jugpadova.it
- url:
http://benfante.blogspot.com/
- skypeId: benfante
- event: *Event-springframework
-
-- &Speaker-LucioBenfanteJugpdnov
- resume: Lucio Benfante è il presidente del JUG Padova e
responsabile di jugevents.
- firstName: Lucio
- lastName: Benfante
- email:
lucio.b...@jugpadova.it
- url:
http://benfante.blogspot.com/
- skypeId: benfante
- event: *Event-jugpdnov
=======================================
--- /jugevents/jugevents-web/src/test/resources/fixtures/User.yml Mon Sep
17 15:42:03 2012
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright (C) 2007-2011 JUG Events Team <
in...@jugevents.org>
-#
-# This file is part of JUG Events Web Application.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-- &User-admin
- username: admin
- password: ceb4f32325eda6142bd65215f4c0f371
- enabled: true
- locked: false
- groups:
- - *Group-administrator
-
-- &User-lucio
- username: lucio
- password: 362cbb563f8587377f3e9bfc3832b2f3
- enabled: true
- locked: false
- groups:
- - *Group-jugger
-
-- &User-fabrizio
- username: fabrizio
- password: 2e5664873121b0e336e3b969dbe98a3
- enabled: true
- locked: false
- groups:
- - *Group-jugger
-
-- &User-enrico
- username: enrico
- password: 6a284f80d6934f5af4addf7689b7e4f5
- enabled: true
- locked: false
- groups:
- - *Group-jugger
- - *Group-administrator
=======================================
--- /jugevents/jugevents-core/pom.xml Fri May 24 23:13:01 2013
+++ /jugevents/jugevents-core/pom.xml Sat May 25 17:49:36 2013
@@ -79,8 +79,22 @@
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.parancoe</groupId>
+ <artifactId>parancoe-web</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>test</scope>
+ </dependency>
-
+ <dependency>
+ <groupId>org.parancoe</groupId>
+ <artifactId>parancoe-test</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -100,6 +114,11 @@
<groupId>org.lambico</groupId>
<artifactId>lambico-test</artifactId>
<scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-library</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
=======================================
---
/jugevents/jugevents-core/src/main/java/org/jugevents/core/util/Utilities.java
Fri May 24 23:13:44 2013
+++
/jugevents/jugevents-core/src/main/java/org/jugevents/core/util/Utilities.java
Sat May 25 17:49:36 2013
@@ -17,6 +17,11 @@
*/
package org.jugevents.core.util;
+
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Date;
@@ -61,7 +66,31 @@
}
return sb;
}
-
+ /**
+ * Reads a resource as stream and converts it into an array of bytes
+ * @param path path of the resource.
+ * @return
+ * @throws IOException
+ */
+ public static byte[] resourceToBytes(String path) throws IOException {
+ InputStream is = null;
+ ByteArrayOutputStream out = null;
+ byte[] buffer = new byte[1024];
+ int len;
+ try {
+ is = Utilities.class.getResourceAsStream(path);
+ out = new ByteArrayOutputStream(buffer.length);
+ while((len = is.read(buffer)) >= 0) {
+ out.write(buffer, 0, len);
+ }
+ return out.toByteArray();
+
+ }
+ finally {
+ is.close();
+ out.close();
+ }
+ }
}
=======================================
--- /jugevents/jugevents-web/src/main/java/it/jugpadova/blo/EventBo.java
Fri May 24 23:13:01 2013
+++ /jugevents/jugevents-web/src/main/java/it/jugpadova/blo/EventBo.java
Sat May 25 17:49:36 2013
@@ -18,7 +18,6 @@
package it.jugpadova.blo;
-import it.jugpadova.Conf;
import it.jugpadova.bean.EventSearch;
import it.jugpadova.bean.NewsMessage;
import it.jugpadova.blol.ServicesBo;
@@ -71,6 +70,7 @@
import org.hibernate.search.FullTextSession;
import org.hibernate.search.Search;
import org.joda.time.DateTime;
+import org.jugevents.core.Conf;
import org.jugevents.core.dao.EventDao;
import org.jugevents.core.dao.LinkedEventDao;
import org.jugevents.core.dao.ParticipantDao;
=======================================
--- /jugevents/jugevents-web/src/main/java/it/jugpadova/blo/JugBo.java Fri
May 24 23:13:01 2013
+++ /jugevents/jugevents-web/src/main/java/it/jugpadova/blo/JugBo.java Sat
May 25 17:49:36 2013
@@ -19,7 +19,6 @@
package it.jugpadova.blo;
import it.jugpadova.blol.ServicesBo;
-import it.jugpadova.Conf;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -39,6 +38,7 @@
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
+import org.jugevents.core.Conf;
import org.jugevents.core.dao.JUGDao;
import org.jugevents.core.po.JUG;
import org.jugevents.core.po.Jugger;
=======================================
--- /jugevents/jugevents-web/src/main/java/it/jugpadova/blo/JuggerBo.java
Fri May 24 23:13:01 2013
+++ /jugevents/jugevents-web/src/main/java/it/jugpadova/blo/JuggerBo.java
Sat May 25 17:49:36 2013
@@ -19,7 +19,6 @@
package it.jugpadova.blo;
import it.jugpadova.blol.ServicesBo;
-import it.jugpadova.Conf;
import it.jugpadova.bean.JuggerSearch;
import it.jugpadova.exception.EmailAlreadyPresentException;
import it.jugpadova.exception.UserAlreadyEnabledException;
@@ -59,6 +58,7 @@
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Restrictions;
+import org.jugevents.core.Conf;
import org.jugevents.core.dao.JUGDao;
import org.jugevents.core.dao.JuggerDao;
import org.jugevents.core.po.JUG;
=======================================
---
/jugevents/jugevents-web/src/main/java/it/jugpadova/blo/ParticipantBo.java
Fri May 24 23:13:01 2013
+++
/jugevents/jugevents-web/src/main/java/it/jugpadova/blo/ParticipantBo.java
Sat May 25 17:49:36 2013
@@ -18,7 +18,6 @@
package it.jugpadova.blo;
-import it.jugpadova.Conf;
import it.jugpadova.bean.ParticipantBean;
import java.io.ByteArrayOutputStream;
@@ -46,6 +45,7 @@
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import org.directwebremoting.proxy.dwr.Util;
+import org.jugevents.core.Conf;
import org.jugevents.core.dao.ParticipantDao;
import org.jugevents.core.po.Event;
import org.jugevents.core.po.Participant;
=======================================
---
/jugevents/jugevents-web/src/main/java/it/jugpadova/blol/SchedulerBo.java
Fri May 24 23:13:01 2013
+++
/jugevents/jugevents-web/src/main/java/it/jugpadova/blol/SchedulerBo.java
Sat May 25 17:49:36 2013
@@ -21,7 +21,6 @@
*/
package it.jugpadova.blol;
-import it.jugpadova.Conf;
import java.util.Date;
import java.util.HashMap;
@@ -31,6 +30,7 @@
import javax.annotation.Resource;
import javax.mail.internet.MimeMessage;
+import org.jugevents.core.Conf;
import org.jugevents.core.dao.ParticipantDao;
import org.jugevents.core.po.Participant;
import org.slf4j.Logger;
=======================================
---
/jugevents/jugevents-web/src/main/java/it/jugpadova/blol/ServicesBo.java
Fri May 24 23:13:01 2013
+++
/jugevents/jugevents-web/src/main/java/it/jugpadova/blol/ServicesBo.java
Sat May 25 17:49:36 2013
@@ -18,7 +18,6 @@
package it.jugpadova.blol;
-import it.jugpadova.Conf;
import java.net.URLEncoder;
import java.util.HashMap;
@@ -31,6 +30,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.velocity.app.VelocityEngine;
+import org.jugevents.core.Conf;
import org.jugevents.core.dao.JuggerDao;
import org.jugevents.core.po.Event;
import org.jugevents.core.po.JUG;
=======================================
***Additional files exist in this changeset.***