[kune-commits] r1820 - in trunk: . debian src/main/java/cc/kune/core/client/rpcservices src/main/java/cc/kune/core/server/rpc src/main/java/cc/kune/events/server/utils src/test/java/cc/kune/core/server/integration/content src/test/java/testsuites
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Mon Apr 2 06:35:24 CEST 2012
Author: vjrj_
Date: 2012-04-02 06:35:24 +0200 (Mon, 02 Apr 2012)
New Revision: 1820
Modified:
trunk/debian/changelog
trunk/pom.xml
trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java
trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java
trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
trunk/src/main/java/cc/kune/core/server/rpc/ContentRPCMock.java
trunk/src/main/java/cc/kune/events/server/utils/EventsServerConversionUtil.java
trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceAddTest.java
trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java
trunk/src/test/java/testsuites/FaultyTestSuite.java
Log:
Fixed some tests
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/debian/changelog 2012-04-02 04:35:24 UTC (rev 1820)
@@ -1,3 +1,9 @@
+kune (0.1.0+b6) oneiric; urgency=low
+
+ * Several bug fixes (trash, access list,...)
+
+ -- Vicente J. Ruiz Jurado <vjrj at ourproject.org> Mon, 02 Apr 2012 06:31:29 +0200
+
kune (0.1.0+b5) oneiric; urgency=low
* Added some new languages and added some profiles to make development faster
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/pom.xml 2012-04-02 04:35:24 UTC (rev 1820)
@@ -463,6 +463,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
+ <!-- http://stackoverflow.com/questions/1370414/how-to-add-the-servlet-api-to-my-pom-xml -->
<version>2.5</version>
<!-- <version>3.0-${wiab.version}</version> -->
<scope>provided</scope>
Modified: trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/main/java/cc/kune/core/client/rpcservices/ContentService.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -91,7 +91,8 @@
StateAbstractDTO renameContent(String userHash, StateToken token, String newName)
throws DefaultException;
- void save(String user, StateToken token, String content) throws DefaultException;
+ // void save(String user, StateToken token, String content) throws
+ // DefaultException;
String sendFeedback(String userHash, String title, String body);
Modified: trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/main/java/cc/kune/core/client/rpcservices/ContentServiceAsync.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -93,7 +93,8 @@
void renameContent(String userHash, StateToken token, String newName,
AsyncCallback<StateAbstractDTO> asyncCallback);
- void save(String user, StateToken token, String content, AsyncCallback<Void> asyncCallback);
+ // void save(String user, StateToken token, String content,
+ // AsyncCallback<Void> asyncCallback);
void sendFeedback(String userHash, String title, String body, AsyncCallback<String> callback);
Modified: trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -554,17 +554,18 @@
return containerManager.renameFolder(group, container, newName);
}
- @Override
@Authenticated
@Authorizated(accessRolRequired = AccessRol.Editor, mustCheckMembership = false)
@KuneTransactional
+ // Not used with wave
public void save(final String userHash, final StateToken token, final String textContent)
throws DefaultException {
-
- final Long contentId = ContentUtils.parseId(token.getDocument());
- final User user = getCurrentUser();
- final Content content = accessService.accessToContent(contentId, user, AccessRol.Editor);
- contentManager.save(user, content, textContent);
+ return;
+ // final Long contentId = ContentUtils.parseId(token.getDocument());
+ // final User user = getCurrentUser();
+ // final Content content = accessService.accessToContent(contentId, user,
+ // AccessRol.Editor);
+ // contentManager.save(user, content, textContent);
}
@Override
Modified: trunk/src/main/java/cc/kune/core/server/rpc/ContentRPCMock.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/ContentRPCMock.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/main/java/cc/kune/core/server/rpc/ContentRPCMock.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -170,11 +170,6 @@
}
@Override
- public void save(final String user, final StateToken token, final String content)
- throws DefaultException {
- }
-
- @Override
public String sendFeedback(final String userHash, final String title, final String body) {
return "#fixme";
}
Modified: trunk/src/main/java/cc/kune/events/server/utils/EventsServerConversionUtil.java
===================================================================
--- trunk/src/main/java/cc/kune/events/server/utils/EventsServerConversionUtil.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/main/java/cc/kune/events/server/utils/EventsServerConversionUtil.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -38,7 +38,6 @@
import net.fortuna.ical4j.model.property.DtEnd;
import net.fortuna.ical4j.model.property.DtStart;
import net.fortuna.ical4j.model.property.Location;
-import net.fortuna.ical4j.model.property.Organizer;
import net.fortuna.ical4j.model.property.Summary;
import net.fortuna.ical4j.model.property.Uid;
@@ -122,7 +121,7 @@
// FIXME here v timezone!!!
final String startS = properties.get(ICalConstants.DATE_TIME_START);
- final DateTime start = new DateTime(startS);
+ final DateTime start = new DateTime(DateUtils.toDate(startS));
final TimeZone timezone = start.getTimeZone();
// start.setTimeZone(timezone);
final String endS = properties.get(ICalConstants.DATE_TIME_END);
@@ -132,24 +131,28 @@
if (allDay != null && Boolean.parseBoolean(allDay)) {
event = new VEvent();
event.getProperties().add(new Summary(properties.get(ICalConstants.SUMMARY)));
- final DtStart eventStart = new DtStart(new Date(startS));
+ final DtStart eventStart = new DtStart(new Date(DateUtils.toDate(startS).getTime()));
eventStart.setTimeZone(timezone);
event.getProperties().add(eventStart);
- final DtEnd eventEnd = new DtEnd(new Date(endS));
+ final DtEnd eventEnd = new DtEnd(new Date(DateUtils.toDate(endS).getTime()));
eventEnd.setTimeZone(timezone);
event.getProperties().add(eventEnd);
event.getProperties().getProperty(Property.DTSTART).getParameters().add(Value.DATE);
event.getProperties().getProperty(Property.DTEND).getParameters().add(Value.DATE);
} else {
- event = new VEvent(start, new DateTime(endS), properties.get(ICalConstants.SUMMARY));
+ event = new VEvent(start, new DateTime(DateUtils.toDate(endS)),
+ properties.get(ICalConstants.SUMMARY));
event.getProperties().getProperty(Property.DTSTART).getParameters().add(Value.DATE_TIME);
event.getProperties().getProperty(Property.DTEND).getParameters().add(Value.DATE_TIME);
}
event.getProperties().add(new Description(properties.get(ICalConstants.DESCRIPTION)));
event.getProperties().add(new Location(properties.get(ICalConstants.LOCATION)));
event.getProperties().add(new Uid(properties.get(ICalConstants.UID)));
- event.getProperties().add(new Organizer(properties.get(ICalConstants.ORGANIZER)));
+ // FIXME This give NPE Uat java.net.URI$Parser.parse(URI.java:3003)). Check
+ // doc:
+ // event.getProperties().add(new
+ // Organizer(properties.get(ICalConstants.ORGANIZER)));
+
return event;
}
-
}
Modified: trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceAddTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceAddTest.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceAddTest.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -162,7 +162,7 @@
doLogout();
doLoginWithDummyUser();
- contentService.save(getHash(), added.getStateToken(), "some new test");
+ // contentService.save(getHash(), added.getStateToken(), "some new test");
// assertEquals(cntRights, added.getContentRights());
// assertEquals(ctxRights, added.getContainerRights());
// assertEquals(groupRights, added.getGroupRights());
Modified: trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -19,9 +19,8 @@
*/
package cc.kune.core.server.integration.content;
-import static org.junit.Assert.assertEquals;
-
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import cc.kune.core.server.TestDomainHelper;
@@ -39,29 +38,34 @@
doLogin();
}
+ @Ignore
@Test
public void testSaveAndRetrieve() throws Exception {
final String text = "Some content";
- final int version = defaultContent.getVersion();
- contentService.save(getHash(), defaultContent.getStateToken(), text);
- final StateContentDTO again = (StateContentDTO) contentService.getContent(getHash(),
- defaultContent.getStateToken());
- assertEquals(defaultContent.getWaveRef(), again.getWaveRef());
- assertEquals(version + 2, again.getVersion());
- assertEquals(0, again.getRateByUsers().intValue());
+ // final int version = defaultContent.getVersion();
+ // contentService.save(getHash(), defaultContent.getStateToken(), text);
+ // final StateContentDTO again = (StateContentDTO)
+ // contentService.getContent(getHash(),
+ // defaultContent.getStateToken());
+ // assertEquals(defaultContent.getWaveRef(), again.getWaveRef());
+ // assertEquals(version + 2, again.getVersion());
+ // assertEquals(0, again.getRateByUsers().intValue());
// Here we fetch the wave content (no the db content)
// assertEquals(text, again.getContent());
- assertEquals(new Double(0), again.getRate());
+ // assertEquals(new Double(0), again.getRate());
}
+ @Ignore
@Test
public void testSaveAndRetrieveBig() throws Exception {
final String text = TestDomainHelper.createBigText();
- final int version = defaultContent.getVersion();
- contentService.save(getHash(), defaultContent.getStateToken(), text);
- final StateContentDTO again = (StateContentDTO) contentService.getContent(getHash(),
- defaultContent.getStateToken());
- assertEquals(version + 2, again.getVersion());
+ // final int version = defaultContent.getVersion();
+ // contentService.save(getHash(), defaultContent.getStateToken(), text);
+ // final StateContentDTO again = (StateContentDTO)
+ // contentService.getContent(getHash(),
+ // defaultContent.getStateToken());
+ // assertEquals(defaultContent.getWaveRef(), again.getWaveRef());
+ // assertEquals(version + 2, again.getVersion());
// Here we fetch the wave content (no the db content)
// assertEquals(text, again.getContent());
}
Modified: trunk/src/test/java/testsuites/FaultyTestSuite.java
===================================================================
--- trunk/src/test/java/testsuites/FaultyTestSuite.java 2012-04-02 04:00:14 UTC (rev 1819)
+++ trunk/src/test/java/testsuites/FaultyTestSuite.java 2012-04-02 04:35:24 UTC (rev 1820)
@@ -28,7 +28,17 @@
*
*/
@RunWith(Suite.class)
- at SuiteClasses({})
+ at SuiteClasses({
+
+// KuneWaveServiceDefaultTest.class, AuthenticatedMethodInterceptorTest.class,
+// AuthorizatedMethodInterceptorTest.class, FinderTest.class,
+// EntityLogoUploadManagerTest.class,
+// FileUploadManagerTest.class, InitDataTest.class, UserServiceTest.class,
+// GroupServiceTest.class,
+// SocialNetworkServiceTest.class, ContentServiceGetTest.class,
+// ContentServiceAddTest.class,
+// StatsServiceTest.class, RateFinderTest.class
+
+})
public class FaultyTestSuite {
-
}
More information about the kune-commits
mailing list