IDEMPIERE-5448 2023 June Platform Update (#1911)
* IDEMPIERE-5448 2023 June Platform Update - update to final tycho 3.0.5 release. * IDEMPIERE-5448 2023 June Platform Update - remove obsolete junit dependency and test code.
This commit is contained in:
parent
83c98b9679
commit
31b2907b0a
|
@ -98,8 +98,6 @@ Import-Package: com.google.zxing,
|
||||||
javax.servlet;version="3.0.0",
|
javax.servlet;version="3.0.0",
|
||||||
javax.servlet.http;version="3.0.0",
|
javax.servlet.http;version="3.0.0",
|
||||||
javax.xml.bind;version="2.3.0",
|
javax.xml.bind;version="2.3.0",
|
||||||
junit.framework;version="3.8.2";resolution:=optional,
|
|
||||||
junit.textui;version="3.8.2";resolution:=optional,
|
|
||||||
net.sf.cglib.proxy,
|
net.sf.cglib.proxy,
|
||||||
net.sourceforge.barbecue,
|
net.sourceforge.barbecue,
|
||||||
net.sourceforge.barbecue.linear.ean,
|
net.sourceforge.barbecue.linear.ean,
|
||||||
|
|
|
@ -1,150 +0,0 @@
|
||||||
/******************************************************************************
|
|
||||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
|
||||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
|
||||||
* under the terms version 2 of the GNU General Public License as published *
|
|
||||||
* by the Free Software Foundation. This program is distributed in the hope *
|
|
||||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
|
||||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
|
||||||
* See the GNU General Public License for more details. *
|
|
||||||
* You should have received a copy of the GNU General Public License along *
|
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
|
||||||
* For the text or an alternative of this public license, you may reach us *
|
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
|
||||||
*****************************************************************************/
|
|
||||||
package org.compiere.util;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The class <code>EMailTest</code> contains tests for the class
|
|
||||||
* EMail
|
|
||||||
* <p>
|
|
||||||
*
|
|
||||||
* @author Jorg Janke
|
|
||||||
* @version $Id: EMailTest.java,v 1.2 2006/07/30 00:54:36 jjanke Exp $
|
|
||||||
*/
|
|
||||||
public class EMailTest extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Construct new test instance
|
|
||||||
*
|
|
||||||
* @param name the test name
|
|
||||||
*/
|
|
||||||
public EMailTest(String name)
|
|
||||||
{
|
|
||||||
super(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
String host = "admin.adempiere.org";
|
|
||||||
String usr = "jjanke";
|
|
||||||
String pwd = "";
|
|
||||||
//
|
|
||||||
String from = "jjanke@adempiere.org";
|
|
||||||
//
|
|
||||||
String to = "jjanke@yahoo.com";
|
|
||||||
String to2 = "jjanke@acm.org";
|
|
||||||
String to3 = "jorg.janke@adempiere.org";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Perform pre-test initialization
|
|
||||||
* @throws Exception
|
|
||||||
* @see TestCase#setUp()
|
|
||||||
*/
|
|
||||||
protected void setUp() throws Exception
|
|
||||||
{
|
|
||||||
super.setUp();
|
|
||||||
org.compiere.Adempiere.startup (true);
|
|
||||||
} // setup
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sending to internal
|
|
||||||
*
|
|
||||||
public void testInternal()
|
|
||||||
{
|
|
||||||
EMail emailTest = new EMail(host, from, from, "TestInternal", "Test Internal Message");
|
|
||||||
assertEquals(emailTest.send(), EMail.SENT_OK);
|
|
||||||
} // testInternal
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sending to internal authenticated
|
|
||||||
*
|
|
||||||
public void testInternalAuthenticate()
|
|
||||||
{
|
|
||||||
EMail emailTest = new EMail(host, from, from, "TestInternalAuthenticate", "Test Internal Authenticate Message");
|
|
||||||
emailTest.setEMailUser(usr, pwd);
|
|
||||||
assertEquals(emailTest.send(), EMail.SENT_OK);
|
|
||||||
} // testInternalAuthenticate
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sending to external
|
|
||||||
*
|
|
||||||
public void testExternal()
|
|
||||||
{
|
|
||||||
EMail emailTest = new EMail(host, from, to, "TestExternal", "Test External Message");
|
|
||||||
assertNotSame(emailTest.send(), EMail.SENT_OK);
|
|
||||||
} // testExternal
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sending to external authenticated
|
|
||||||
*
|
|
||||||
public void testExternalAuthenticate()
|
|
||||||
{
|
|
||||||
EMail emailTest = new EMail(host, from, to, "TestExternalAuthenticate", "Test External Authenticate Message");
|
|
||||||
emailTest.setEMailUser(usr, pwd);
|
|
||||||
assertEquals(emailTest.send(), EMail.SENT_OK);
|
|
||||||
} // testExternalAuthenticate
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sending HTML
|
|
||||||
*
|
|
||||||
public void testHTML()
|
|
||||||
{
|
|
||||||
EMail emailTest = new EMail(host, from, to);
|
|
||||||
emailTest.addCc(to2);
|
|
||||||
emailTest.setMessageHTML("TestHTML", "Test HTML Message");
|
|
||||||
emailTest.setEMailUser(usr, pwd);
|
|
||||||
assertEquals(emailTest.send(), EMail.SENT_OK);
|
|
||||||
} // testHTML
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sending Attachment
|
|
||||||
*
|
|
||||||
public void testAttachment()
|
|
||||||
{
|
|
||||||
EMail emailTest = new EMail(host, from, to, "TestAttachment", "Test Attachment Message");
|
|
||||||
emailTest.addTo(to2);
|
|
||||||
emailTest.addCc(to3);
|
|
||||||
emailTest.addAttachment(new File("C:\\Adempiere\\RUN_Adempiere.sh"));
|
|
||||||
emailTest.setEMailUser(usr, pwd);
|
|
||||||
assertEquals(emailTest.send(), EMail.SENT_OK);
|
|
||||||
} // testAttachmentHTML
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test sending Attachment HTML
|
|
||||||
*/
|
|
||||||
public void testAttachmentHTML()
|
|
||||||
{
|
|
||||||
EMail emailTest = new EMail(System.getProperties(), host, from, to, null, null);
|
|
||||||
emailTest.addTo(to2);
|
|
||||||
emailTest.addCc(to3);
|
|
||||||
emailTest.setMessageHTML("TestAttachmentHTML", "Test Attachment HTML Message");
|
|
||||||
emailTest.addAttachment(new File("C:\\Adempiere\\RUN_Adempiere.sh"));
|
|
||||||
emailTest.createAuthenticator(usr, pwd);
|
|
||||||
assertEquals(emailTest.send(), EMail.SENT_OK);
|
|
||||||
} // testAttachmentHTML
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Launch the test.
|
|
||||||
* @param args String[]
|
|
||||||
*/
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
junit.textui.TestRunner.run(EMailTest.class);
|
|
||||||
} // main
|
|
||||||
|
|
||||||
} // EMailTest
|
|
|
@ -12,7 +12,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<revision>11.0.0-SNAPSHOT</revision>
|
<revision>11.0.0-SNAPSHOT</revision>
|
||||||
<jdk.version>17</jdk.version>
|
<jdk.version>17</jdk.version>
|
||||||
<tycho.version>3.0.5-SNAPSHOT</tycho.version>
|
<tycho.version>3.0.5</tycho.version>
|
||||||
<tycho.extras.version>${tycho.version}</tycho.extras.version>
|
<tycho.extras.version>${tycho.version}</tycho.extras.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<jp.version>6.17.0</jp.version>
|
<jp.version>6.17.0</jp.version>
|
||||||
|
@ -35,13 +35,6 @@
|
||||||
<target.version>17</target.version>
|
<target.version>17</target.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<pluginRepositories>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>tycho-snapshots</id>
|
|
||||||
<url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
|
|
||||||
</pluginRepository>
|
|
||||||
</pluginRepositories>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
Loading…
Reference in New Issue