Search in sources :

Example 6 with Conference

use of com.github.lantoine.lamsadetools.conferences.Conference in project LAMSADE-tools by LAntoine.

the class TestConferenceDataBases method insertInDatabase.

@Test
public void insertInDatabase() throws SQLException {
    String dateFormat = "dd/MM/yyyy";
    DateTimeFormatter dtf = DateTimeFormatter.ofPattern(dateFormat);
    dtf.withLocale(Locale.FRANCE);
    Conference conf = new Conference("Antoine s conf", "url", LocalDate.parse("10/03/2017", dtf), LocalDate.parse("11/03/2017", dtf), 0, "city", "address");
    ConferenceDatabase.insertInDatabase(conf);
}
Also used : DateTimeFormatter(java.time.format.DateTimeFormatter) Conference(com.github.lantoine.lamsadetools.conferences.Conference) Test(org.junit.Test)

Aggregations

Conference (com.github.lantoine.lamsadetools.conferences.Conference)6 LocalDate (java.time.LocalDate)4 DateTimeFormatter (java.time.format.DateTimeFormatter)3 Connection (java.sql.Connection)2 PreparedStatement (java.sql.PreparedStatement)2 ResultSet (java.sql.ResultSet)2 Statement (java.sql.Statement)2 DateFormat (java.text.DateFormat)2 SimpleDateFormat (java.text.SimpleDateFormat)2 ArrayList (java.util.ArrayList)2 Point (org.eclipse.swt.graphics.Point)2 AddressInfos (com.github.lantoine.lamsadetools.map.AddressInfos)1 GoogleItineraryMap (com.github.lantoine.lamsadetools.map.GoogleItineraryMap)1 UserDetails (com.github.lantoine.lamsadetools.setCoordinates.UserDetails)1 IOException (java.io.IOException)1 SQLException (java.sql.SQLException)1 DateTimeParseException (java.time.format.DateTimeParseException)1 Scanner (java.util.Scanner)1 ParserException (net.fortuna.ical4j.data.ParserException)1 ValidationException (net.fortuna.ical4j.model.ValidationException)1