Tony CHEMIT pushed to branch develop at ultreiaio / ird-t3

Commits:

15 changed files:

Changes:

  • t3-actions/src/main/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionITSupport.java
    ... ... @@ -94,7 +94,7 @@ public abstract class AnalyzeInputSourceActionITSupport {
    94 94
             if (doIt) {
    
    95 95
                 String dbName = msConfig.dbName;
    
    96 96
                 log.debug("Do test for db " + dbName);
    
    97
    -            outputFile = new File(serviceContext.getTestDir(), "result.txt");
    
    97
    +            outputFile = new File(serviceContext.getTestDir().getParentFile().getParentFile(), dbName.replace(".mdb","-result.txt"));
    
    98 98
                 log.info("Will save result in file : " + outputFile);
    
    99 99
                 outputWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile)));
    
    100 100
                 File workingDirectory = serviceContext.getApplicationConfiguration().getTreatmentWorkingDirectory("yo", true);
    
    ... ... @@ -113,30 +113,28 @@ public abstract class AnalyzeInputSourceActionITSupport {
    113 113
             if (outputWriter != null) {
    
    114 114
                 outputWriter.flush();
    
    115 115
                 outputWriter.close();
    
    116
    +            log.info(new String(Files.readAllBytes(outputFile.toPath())));
    
    116 117
             }
    
    117 118
         }
    
    118
    -
    
    119 119
         void testExecute(OceanFixtures fixture) throws Exception {
    
    120
    -        testExecute(
    
    121
    -                fixture.nbSafe(),
    
    122
    -                fixture.nbUnsafe(),
    
    123
    -                fixture.nbSafeWithoutWell(),
    
    124
    -                fixture.nbUnsafeWithoutWell(),
    
    125
    -                TripType.STANDARD,
    
    126
    -                false,
    
    127
    -                false
    
    128
    -        );
    
    120
    +        testExecute(fixture, TripType.STANDARD);
    
    121
    +    }
    
    122
    +    void testExecute(OceanFixtures fixture, TripType tripType) throws Exception {
    
    123
    +        serviceContext.getMsConfig().setUseWells(false);
    
    124
    +        testExecute(fixture.nbSafe(), fixture.nbUnsafe(), fixture.nbSafeWithoutWell(), fixture.nbUnsafeWithoutWell(), tripType, false, false);
    
    125
    +//        serviceContext.getMsConfig().setUseWells(true);
    
    126
    +//        testExecute(fixture.nbSafe(), fixture.nbUnsafe(), fixture.nbSafeWithoutWell(), fixture.nbUnsafeWithoutWell(), TripType.STANDARD, false, false);
    
    129 127
         }
    
    130 128
     
    
    131 129
     
    
    132 130
         public void testExecute(int nbSafe,
    
    133 131
                                 int nbUnsafe,
    
    134
    -                            int nbSafeWithoutwell,
    
    132
    +                            int nbSafeWithoutWell,
    
    135 133
                                 int nbUnsafeWithoutWell) throws Exception {
    
    136 134
             testExecute(
    
    137 135
                     nbSafe,
    
    138 136
                     nbUnsafe,
    
    139
    -                nbSafeWithoutwell,
    
    137
    +                nbSafeWithoutWell,
    
    140 138
                     nbUnsafeWithoutWell,
    
    141 139
                     TripType.STANDARD,
    
    142 140
                     false,
    
    ... ... @@ -168,13 +166,16 @@ public abstract class AnalyzeInputSourceActionITSupport {
    168 166
                 Set<Trip> unsafeTrips = action.getResultAsSet(AnalyzeInputSourceAction.RESULT_UNSAFE_TRIPS, Trip.class);
    
    169 167
                 Assert.assertNotNull(unsafeTrips);
    
    170 168
                 outputWriter.write(String.format("found %d unsafe trip(s).\n", unsafeTrips.size()));
    
    169
    +
    
    170
    +            log.info(String.format("\n[%s](useWells?%b) safe : %d - unsafe : %d\n", msConfig.dbName, msConfig.isUseWells(), safeTrips.size(), unsafeTrips.size()));
    
    171
    +
    
    171 172
                 List<String> messages;
    
    172
    -            if (log.isWarnEnabled()) {
    
    173
    +            if (msConfig.isLogWarnings() && log.isWarnEnabled()) {
    
    173 174
                     messages = action.getWarnMessages();
    
    174 175
                     if (CollectionUtils.isNotEmpty(messages)) {
    
    175 176
                         for (String message : messages) {
    
    176
    -                        log.warn(String.format("[WARNING] %s\n", message));
    
    177
    -//                        outputWriter.write(String.format("[WARNING] %s\n", message));
    
    177
    +//                        log.debug(String.format("[WARNING] %s", message));
    
    178
    +                        outputWriter.write(String.format("[WARNING] %s\n", message));
    
    178 179
                         }
    
    179 180
                     }
    
    180 181
                 }
    
    ... ... @@ -187,9 +188,6 @@ public abstract class AnalyzeInputSourceActionITSupport {
    187 188
                     }
    
    188 189
                 }
    
    189 190
     
    
    190
    -            outputWriter.flush();
    
    191
    -            log.info(String.format("\n[%s] safe : %d - unsafe : %d\n", msConfig.dbName, safeTrips.size(), unsafeTrips.size()));
    
    192
    -            log.info(new String(Files.readAllBytes(outputFile.toPath())));
    
    193 191
                 if (msConfig.isUseWells()) {
    
    194 192
                     Assert.assertEquals(nbSafe, safeTrips.size());
    
    195 193
                     Assert.assertEquals(nbUnsafe, unsafeTrips.size());
    

  • t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/AnalyzeAvdthTestSupport.java
    1
    +/*
    
    2
    + * #%L
    
    3
    + * T3 :: Actions
    
    4
    + * %%
    
    5
    + * Copyright (C) 2010 - 2018 IRD, Code Lutin, Ultreia.io
    
    6
    + * %%
    
    7
    + * This program is free software: you can redistribute it and/or modify
    
    8
    + * it under the terms of the GNU Affero General Public License as published by
    
    9
    + * the Free Software Foundation, either version 3 of the License, or
    
    10
    + * (at your option) any later version.
    
    11
    + *
    
    12
    + * This program is distributed in the hope that it will be useful,
    
    13
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    + * GNU General Public License for more details.
    
    16
    + *
    
    17
    + * You should have received a copy of the GNU Affero General Public License
    
    18
    + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    19
    + * #L%
    
    20
    + */
    
    21
    +package fr.ird.t3.actions.io.input.test;
    
    22
    +
    
    23
    +import fr.ird.t3.actions.T3Action;
    
    24
    +import fr.ird.t3.actions.T3ActionContext;
    
    25
    +import fr.ird.t3.actions.io.input.AnalyzeInputSourceAction;
    
    26
    +import fr.ird.t3.actions.io.input.AnalyzeInputSourceConfiguration;
    
    27
    +import fr.ird.t3.entities.data.Trip;
    
    28
    +import fr.ird.t3.entities.data.TripType;
    
    29
    +import fr.ird.t3.io.input.T3InputProvider;
    
    30
    +import fr.ird.t3.services.T3InputService;
    
    31
    +import fr.ird.t3.services.T3ServiceFactory;
    
    32
    +import org.apache.commons.collections4.CollectionUtils;
    
    33
    +import org.apache.commons.io.FileUtils;
    
    34
    +import org.apache.commons.logging.Log;
    
    35
    +import org.apache.commons.logging.LogFactory;
    
    36
    +import org.junit.After;
    
    37
    +import org.junit.AfterClass;
    
    38
    +import org.junit.Assert;
    
    39
    +import org.junit.Assume;
    
    40
    +import org.junit.Before;
    
    41
    +import org.junit.ClassRule;
    
    42
    +import org.junit.Test;
    
    43
    +import org.junit.runner.RunWith;
    
    44
    +import org.junit.runners.Parameterized;
    
    45
    +
    
    46
    +import java.io.BufferedWriter;
    
    47
    +import java.io.File;
    
    48
    +import java.io.FileOutputStream;
    
    49
    +import java.io.IOException;
    
    50
    +import java.io.OutputStreamWriter;
    
    51
    +import java.util.List;
    
    52
    +import java.util.Set;
    
    53
    +
    
    54
    +/**
    
    55
    + * @author Tony Chemit - dev@tchemit.fr
    
    56
    + * @since 1.0
    
    57
    + */
    
    58
    +@RunWith(Parameterized.class)
    
    59
    +public abstract class AnalyzeAvdthTestSupport {
    
    60
    +
    
    61
    +    @ClassRule
    
    62
    +    public static final FakeT3AvdthServiceContext serviceContext = new FakeT3AvdthServiceContext(true, null);
    
    63
    +    private static final Log log = LogFactory.getLog(AnalyzeAvdthTestSupport.class);
    
    64
    +    @Parameterized.Parameter
    
    65
    +    public OceanFixtures fixtures;
    
    66
    +
    
    67
    +    private BufferedWriter outputWriter;
    
    68
    +    private File target;
    
    69
    +    private T3InputProvider inputProvider;
    
    70
    +    private MSAccessTestConfiguration msConfig;
    
    71
    +
    
    72
    +    @AfterClass
    
    73
    +    public static void afterClass() {
    
    74
    +        serviceContext.close();
    
    75
    +    }
    
    76
    +
    
    77
    +    protected abstract MSAccessTestConfiguration createConfiguration();
    
    78
    +
    
    79
    +    @Before
    
    80
    +    public void setUp() throws IOException {
    
    81
    +
    
    82
    +        msConfig = createConfiguration();
    
    83
    +        boolean initOk = serviceContext.isInitOk() && msConfig.setup(fixtures);
    
    84
    +        Assume.assumeTrue("Could not init db", initOk);
    
    85
    +
    
    86
    +        String dbName = msConfig.dbName;
    
    87
    +        log.debug(String.format("Do test for db %s", dbName));
    
    88
    +        File outputFile = new File(serviceContext.getTestDir().getParentFile().getParentFile(), dbName.replace(".mdb", (msConfig.isUseWells() ? "-useWells" : "") + "-result.txt"));
    
    89
    +        log.info(String.format("Will save result in file : %s", outputFile));
    
    90
    +        outputWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile)));
    
    91
    +        File workingDirectory = serviceContext.getApplicationConfiguration().getTreatmentWorkingDirectory("yo", true);
    
    92
    +        // push in treatment directory the base to import
    
    93
    +        target = new File(workingDirectory, dbName);
    
    94
    +        log.debug(String.format("Will copy msAccess from %s to %s", msConfig.accessFile, target));
    
    95
    +        FileUtils.copyFile(msConfig.accessFile, target);
    
    96
    +        T3InputService inputService = serviceContext.newService(T3InputService.class);
    
    97
    +        inputProvider = inputService.getProvider(msConfig.getProviderId());
    
    98
    +    }
    
    99
    +
    
    100
    +    @After
    
    101
    +    public void tearDown() throws Exception {
    
    102
    +        if (outputWriter != null) {
    
    103
    +            outputWriter.flush();
    
    104
    +            outputWriter.close();
    
    105
    +        }
    
    106
    +    }
    
    107
    +
    
    108
    +    @Test
    
    109
    +    public void testExecute() throws Exception {
    
    110
    +
    
    111
    +        boolean useWells = msConfig.isUseWells();
    
    112
    +        int nbSafe = fixtures.nbSafe(useWells);
    
    113
    +        int nbUnsafe = fixtures.nbUnsafe(useWells);
    
    114
    +        TripType tripType = msConfig.getTripType();
    
    115
    +        if (tripType == null) {
    
    116
    +            tripType = TripType.STANDARD;
    
    117
    +        }
    
    118
    +        FakeT3AvdthServiceContext serviceContext = getServiceContext();
    
    119
    +
    
    120
    +        T3ServiceFactory serviceFactory = serviceContext.getServiceFactory();
    
    121
    +        AnalyzeInputSourceConfiguration actionConfiguration = AnalyzeInputSourceConfiguration.newConfiguration(
    
    122
    +                getInputProvider(), getTarget(), useWells, tripType, false, false);
    
    123
    +
    
    124
    +        T3ActionContext<AnalyzeInputSourceConfiguration> context = serviceFactory.newT3ActionContext(actionConfiguration, serviceContext);
    
    125
    +
    
    126
    +        BufferedWriter outputWriter = getOutputWriter();
    
    127
    +        outputWriter.write("----------------------------------------------------\n");
    
    128
    +        outputWriter.write(msConfig.getAccessFile() + "\n");
    
    129
    +        T3Action<AnalyzeInputSourceConfiguration> action;
    
    130
    +
    
    131
    +        action = serviceFactory.newT3Action(AnalyzeInputSourceAction.class, context);
    
    132
    +        Assert.assertNotNull(action);
    
    133
    +        action.run();
    
    134
    +
    
    135
    +        Set<Trip> safeTrips = action.getResultAsSet(AnalyzeInputSourceAction.RESULT_SAFE_TRIPS, Trip.class);
    
    136
    +        Assert.assertNotNull(safeTrips);
    
    137
    +        outputWriter.write(String.format("found %d   safe trip(s).\n", safeTrips.size()));
    
    138
    +        Set<Trip> unsafeTrips = action.getResultAsSet(AnalyzeInputSourceAction.RESULT_UNSAFE_TRIPS, Trip.class);
    
    139
    +        Assert.assertNotNull(unsafeTrips);
    
    140
    +        outputWriter.write(String.format("found %d unsafe trip(s).\n", unsafeTrips.size()));
    
    141
    +        List<String> messages;
    
    142
    +        if (msConfig.isLogWarnings() && log.isWarnEnabled()) {
    
    143
    +            messages = action.getWarnMessages();
    
    144
    +            if (CollectionUtils.isNotEmpty(messages)) {
    
    145
    +                for (String message : messages) {
    
    146
    +                    outputWriter.write(String.format("[WARNING] %s\n", message));
    
    147
    +                }
    
    148
    +            }
    
    149
    +        }
    
    150
    +        if (log.isErrorEnabled()) {
    
    151
    +            messages = action.getErrorMessages();
    
    152
    +            if (CollectionUtils.isNotEmpty(messages)) {
    
    153
    +                for (String message : messages) {
    
    154
    +                    outputWriter.write(String.format("[ERROR] %s\n", message));
    
    155
    +                }
    
    156
    +            }
    
    157
    +        }
    
    158
    +        log.info(String.format("\n[%s] (useWells?%b) safe : %d - unsafe : %d\n", msConfig.getDbName(), useWells, safeTrips.size(), unsafeTrips.size()));
    
    159
    +        Assert.assertEquals(nbSafe, safeTrips.size());
    
    160
    +        Assert.assertEquals(nbUnsafe, unsafeTrips.size());
    
    161
    +    }
    
    162
    +
    
    163
    +    public FakeT3AvdthServiceContext getServiceContext() {
    
    164
    +        return serviceContext;
    
    165
    +    }
    
    166
    +
    
    167
    +    public BufferedWriter getOutputWriter() {
    
    168
    +        return outputWriter;
    
    169
    +    }
    
    170
    +
    
    171
    +    public File getTarget() {
    
    172
    +        return target;
    
    173
    +    }
    
    174
    +
    
    175
    +    public T3InputProvider getInputProvider() {
    
    176
    +        return inputProvider;
    
    177
    +    }
    
    178
    +}

  • t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/AnalyzeInputSourceActionTestSupport.java
    ... ... @@ -183,4 +183,56 @@ public abstract class AnalyzeInputSourceActionTestSupport {
    183 183
                 }
    
    184 184
             }
    
    185 185
         }
    
    186
    +
    
    187
    +    protected void testExecute2(OceanFixtures fixture, TripType tripType) throws Exception {
    
    188
    +
    
    189
    +        MSAccessTestConfiguration msConfig = getMsConfig();
    
    190
    +        boolean useWells = msConfig.isUseWells();
    
    191
    +        int nbSafe = fixture.nbSafe(useWells);
    
    192
    +        int nbUnsafe = fixture.nbUnsafe(useWells);
    
    193
    +
    
    194
    +        FakeT3AvdthServiceContext serviceContext = getServiceContext();
    
    195
    +
    
    196
    +        T3ServiceFactory serviceFactory = serviceContext.getServiceFactory();
    
    197
    +        AnalyzeInputSourceConfiguration actionConfiguration = AnalyzeInputSourceConfiguration.newConfiguration(
    
    198
    +                getInputProvider(), getTarget(), useWells, tripType, false, false);
    
    199
    +
    
    200
    +        T3ActionContext<AnalyzeInputSourceConfiguration> context = serviceFactory.newT3ActionContext(actionConfiguration, serviceContext);
    
    201
    +
    
    202
    +        BufferedWriter outputWriter = getOutputWriter();
    
    203
    +        outputWriter.write("----------------------------------------------------\n");
    
    204
    +        outputWriter.write(msConfig.getAccessFile() + "\n");
    
    205
    +        T3Action<AnalyzeInputSourceConfiguration> action;
    
    206
    +
    
    207
    +        action = serviceFactory.newT3Action(AnalyzeInputSourceAction.class, context);
    
    208
    +        Assert.assertNotNull(action);
    
    209
    +        action.run();
    
    210
    +
    
    211
    +        Set<Trip> safeTrips = action.getResultAsSet(AnalyzeInputSourceAction.RESULT_SAFE_TRIPS, Trip.class);
    
    212
    +        Assert.assertNotNull(safeTrips);
    
    213
    +        outputWriter.write(String.format("found %d   safe trip(s).\n", safeTrips.size()));
    
    214
    +        Set<Trip> unsafeTrips = action.getResultAsSet(AnalyzeInputSourceAction.RESULT_UNSAFE_TRIPS, Trip.class);
    
    215
    +        Assert.assertNotNull(unsafeTrips);
    
    216
    +        outputWriter.write(String.format("found %d unsafe trip(s).\n", unsafeTrips.size()));
    
    217
    +        List<String> messages;
    
    218
    +        if (msConfig.isLogWarnings() && log.isWarnEnabled()) {
    
    219
    +            messages = action.getWarnMessages();
    
    220
    +            if (CollectionUtils.isNotEmpty(messages)) {
    
    221
    +                for (String message : messages) {
    
    222
    +                    outputWriter.write(String.format("[WARNING] %s\n", message));
    
    223
    +                }
    
    224
    +            }
    
    225
    +        }
    
    226
    +        if (log.isErrorEnabled()) {
    
    227
    +            messages = action.getErrorMessages();
    
    228
    +            if (CollectionUtils.isNotEmpty(messages)) {
    
    229
    +                for (String message : messages) {
    
    230
    +                    outputWriter.write(String.format("[ERROR] %s\n", message));
    
    231
    +                }
    
    232
    +            }
    
    233
    +        }
    
    234
    +        log.info(String.format("\n[%s] (useWells?%b) safe : %d - unsafe : %d\n", msConfig.getDbName(), useWells, safeTrips.size(), unsafeTrips.size()));
    
    235
    +        Assert.assertEquals(nbSafe, safeTrips.size());
    
    236
    +        Assert.assertEquals(nbUnsafe, unsafeTrips.size());
    
    237
    +    }
    
    186 238
     }

  • t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/MSAccessTestConfiguration.java
    ... ... @@ -20,6 +20,7 @@
    20 20
      */
    
    21 21
     package fr.ird.t3.actions.io.input.test;
    
    22 22
     
    
    23
    +import fr.ird.t3.entities.data.TripType;
    
    23 24
     import org.apache.commons.lang3.StringUtils;
    
    24 25
     import org.apache.commons.logging.Log;
    
    25 26
     import org.apache.commons.logging.LogFactory;
    
    ... ... @@ -51,6 +52,8 @@ public class MSAccessTestConfiguration {
    51 52
         private Boolean executeAll;
    
    52 53
         private File dbBasedir;
    
    53 54
         private boolean useWells;
    
    55
    +    private boolean logWarnings;
    
    56
    +    private TripType tripType;
    
    54 57
     
    
    55 58
         public MSAccessTestConfiguration(String testNamePattern, String dbPattern, String providerId) {
    
    56 59
             this.testNamePattern = Pattern.compile(testNamePattern);
    
    ... ... @@ -185,7 +188,55 @@ public class MSAccessTestConfiguration {
    185 188
             return useWells;
    
    186 189
         }
    
    187 190
     
    
    191
    +    public void setUseWells(boolean useWells) {
    
    192
    +        this.useWells = useWells;
    
    193
    +    }
    
    194
    +
    
    188 195
         public String getProviderId() {
    
    189 196
             return providerId;
    
    190 197
         }
    
    198
    +
    
    199
    +    public boolean isLogWarnings() {
    
    200
    +        return logWarnings;
    
    201
    +    }
    
    202
    +
    
    203
    +    public void setLogWarnings(boolean logWarnings) {
    
    204
    +        this.logWarnings = logWarnings;
    
    205
    +    }
    
    206
    +
    
    207
    +    public boolean setup(OceanFixtures fixtures) {
    
    208
    +        String[] split = DB_PATH.split(":");
    
    209
    +        dbBasedir = getBasedir();
    
    210
    +        for (String s1 : split) {
    
    211
    +            dbBasedir = new File(dbBasedir, s1);
    
    212
    +        }
    
    213
    +        if (!dbBasedir.exists()) {
    
    214
    +            log.warn(String.format("Db directory [%s] does not exist, will skip test.", dbBasedir));
    
    215
    +            return false;
    
    216
    +        }
    
    217
    +        log.info(String.format("Db directory [%s] detected, will do tests.", dbBasedir));
    
    218
    +
    
    219
    +        String[] fixtureName = fixtures.toString().split("_");
    
    220
    +        String ocean = fixtureName[0];
    
    221
    +        String group = fixtureName[1];
    
    222
    +        dbName = String.format(dbPattern, ocean, group);
    
    223
    +        accessFile = new File(new File(dbBasedir, ocean), dbName);
    
    224
    +        boolean exists = accessFile.exists();
    
    225
    +        if (!exists) {
    
    226
    +            log.warn(String.format("Could not find access file %s", accessFile));
    
    227
    +            return false;
    
    228
    +        }
    
    229
    +        log.debug(String.format("DbName = %s", dbName));
    
    230
    +
    
    231
    +        execute = true;
    
    232
    +        return true;
    
    233
    +    }
    
    234
    +
    
    235
    +    public void setTripType(TripType tripType) {
    
    236
    +        this.tripType = tripType;
    
    237
    +    }
    
    238
    +
    
    239
    +    public TripType getTripType() {
    
    240
    +        return tripType;
    
    241
    +    }
    
    191 242
     }

  • t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/OceanFixtures.java
    ... ... @@ -10,12 +10,12 @@ package fr.ird.t3.actions.io.input.test;
    10 10
      * it under the terms of the GNU Affero General Public License as published by
    
    11 11
      * the Free Software Foundation, either version 3 of the License, or
    
    12 12
      * (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU Affero General Public License
    
    20 20
      * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    21 21
      * #L%
    
    ... ... @@ -28,11 +28,19 @@ package fr.ird.t3.actions.io.input.test;
    28 28
      */
    
    29 29
     public interface OceanFixtures {
    
    30 30
     
    
    31
    -    int nbSafe() ;
    
    31
    +    default int nbSafe(boolean useWells) {
    
    32
    +        return useWells ? nbSafe() : nbSafeWithoutWell();
    
    33
    +    }
    
    34
    +
    
    35
    +    default int nbUnsafe(boolean useWells) {
    
    36
    +        return useWells ? nbUnsafe() : nbUnsafeWithoutWell();
    
    37
    +    }
    
    38
    +
    
    39
    +    int nbSafe();
    
    32 40
     
    
    33
    -    int nbUnsafe() ;
    
    41
    +    int nbUnsafe();
    
    34 42
     
    
    35 43
         int nbSafeWithoutWell();
    
    36 44
     
    
    37
    -    int nbUnsafeWithoutWell() ;
    
    45
    +    int nbUnsafeWithoutWell();
    
    38 46
     }

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AnalyzeAvdthTestV35Atlantic.java
    1
    +package fr.ird.t3.actions.io.input;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * T3 :: Input AVDTH v 35
    
    6
    + * %%
    
    7
    + * Copyright (C) 2010 - 2018 IRD, Code Lutin, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU Affero General Public License as published by
    
    11
    + * the Free Software Foundation, either version 3 of the License, or
    
    12
    + * (at your option) any later version.
    
    13
    + * 
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + * 
    
    19
    + * You should have received a copy of the GNU Affero General Public License
    
    20
    + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    21
    + * #L%
    
    22
    + */
    
    23
    +
    
    24
    +import fr.ird.t3.actions.io.input.test.AnalyzeAvdthTestSupport;
    
    25
    +import fr.ird.t3.actions.io.input.test.MSAccessTestConfiguration;
    
    26
    +import fr.ird.t3.entities.data.TripType;
    
    27
    +import fr.ird.t3.io.input.avdth.v35.T3InputProviderAvdth35;
    
    28
    +import org.junit.Ignore;
    
    29
    +import org.junit.runners.Parameterized;
    
    30
    +
    
    31
    +import java.util.Arrays;
    
    32
    +import java.util.List;
    
    33
    +
    
    34
    +/**
    
    35
    + * Created by tchemit on 08/03/2018.
    
    36
    + *
    
    37
    + * @author Tony Chemit - dev@tchemit.fr
    
    38
    + */
    
    39
    +@Ignore
    
    40
    +public class AnalyzeAvdthTestV35Atlantic extends AnalyzeAvdthTestSupport {
    
    41
    +
    
    42
    +    @Parameterized.Parameters
    
    43
    +    public static List<AtlanticOceanFixtures> data() {
    
    44
    +        return Arrays.asList(AtlanticOceanFixtures.values());
    
    45
    +    }
    
    46
    +
    
    47
    +    @Override
    
    48
    +    protected MSAccessTestConfiguration createConfiguration() {
    
    49
    +        MSAccessTestConfiguration configuration = new MSAccessTestConfiguration("testExecute_([^_]*)_(\\d+)(_.+)*", "%s_%s_V35.mdb", T3InputProviderAvdth35.ID);
    
    50
    +        configuration.setUseWells(false);
    
    51
    +        configuration.setTripType(TripType.LOGBOOKMISSING);
    
    52
    +        return configuration;
    
    53
    +    }
    
    54
    +}

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AnalyzeAvdthTestV35Indian.java
    1
    +package fr.ird.t3.actions.io.input;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * T3 :: Input AVDTH v 35
    
    6
    + * %%
    
    7
    + * Copyright (C) 2010 - 2018 IRD, Code Lutin, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU Affero General Public License as published by
    
    11
    + * the Free Software Foundation, either version 3 of the License, or
    
    12
    + * (at your option) any later version.
    
    13
    + * 
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + * 
    
    19
    + * You should have received a copy of the GNU Affero General Public License
    
    20
    + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    21
    + * #L%
    
    22
    + */
    
    23
    +
    
    24
    +import fr.ird.t3.actions.io.input.test.AnalyzeAvdthTestSupport;
    
    25
    +import fr.ird.t3.actions.io.input.test.MSAccessTestConfiguration;
    
    26
    +import fr.ird.t3.entities.data.TripType;
    
    27
    +import fr.ird.t3.io.input.avdth.v35.T3InputProviderAvdth35;
    
    28
    +import org.junit.Ignore;
    
    29
    +import org.junit.runners.Parameterized;
    
    30
    +
    
    31
    +import java.util.Arrays;
    
    32
    +import java.util.List;
    
    33
    +
    
    34
    +/**
    
    35
    + * Created by tchemit on 08/03/2018.
    
    36
    + *
    
    37
    + * @author Tony Chemit - dev@tchemit.fr
    
    38
    + */
    
    39
    +@Ignore
    
    40
    +public class AnalyzeAvdthTestV35Indian extends AnalyzeAvdthTestSupport {
    
    41
    +
    
    42
    +    @Parameterized.Parameters
    
    43
    +    public static List<IndianOceanFixtures> data() {
    
    44
    +        return Arrays.asList(IndianOceanFixtures.values());
    
    45
    +    }
    
    46
    +
    
    47
    +    @Override
    
    48
    +    protected MSAccessTestConfiguration createConfiguration() {
    
    49
    +        MSAccessTestConfiguration configuration = new MSAccessTestConfiguration("testExecute_([^_]*)_(\\d+)(_.+)*", "%s_%s_V35.mdb", T3InputProviderAvdth35.ID);
    
    50
    +        configuration.setUseWells(false);
    
    51
    +        configuration.setTripType(TripType.LOGBOOKMISSING);
    
    52
    +        return configuration;
    
    53
    +    }
    
    54
    +}

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AnalyzeInputSourceActionTest.java
    ... ... @@ -46,6 +46,11 @@ public class AnalyzeInputSourceActionTest extends AnalyzeInputSourceActionTestSu
    46 46
         }
    
    47 47
     
    
    48 48
         @Test
    
    49
    +    public void testExecute_OA_1980() throws Exception {
    
    50
    +        testExecute(AtlanticOceanFixtures.OA_1980, TripType.LOGBOOKMISSING);
    
    51
    +    }
    
    52
    +
    
    53
    +    @Test
    
    49 54
         public void testExecute_OI_2000() throws Exception {
    
    50 55
             testExecute(IndianOceanFixtures.OI_2000);
    
    51 56
         }
    

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AtlanticOceanFixtures.java
    ... ... @@ -30,73 +30,74 @@ import fr.ird.t3.actions.io.input.test.OceanFixtures;
    30 30
      */
    
    31 31
     public enum AtlanticOceanFixtures implements OceanFixtures {
    
    32 32
     
    
    33
    -    OA_1960(318, 36, 352, 2),
    
    34
    -    OA_1961(298, 63, 361, 0),
    
    35
    -    OA_1962(184, 133, 317, 0),
    
    36
    -    OA_1963(218, 157, 375, 0),
    
    37
    -    OA_1964(121, 61, 182, 0),
    
    38
    -    OA_1965(93, 31, 124, 0),
    
    39
    -    OA_1966(70, 27, 97, 0),
    
    40
    -    OA_1967(53, 27, 80, 0),
    
    41
    -    OA_1968(46, 14, 60, 0),
    
    42
    -    OA_1969(64, 21, 86, 0),
    
    43
    -
    
    44
    -    OA_1970(318, 36, 352, 2),
    
    45
    -    OA_1971(298, 63, 361, 0),
    
    46
    -    OA_1972(184, 133, 317, 0),
    
    47
    -    OA_1973(218, 157, 375, 0),
    
    48
    -    OA_1974(121, 61, 182, 0),
    
    49
    -    OA_1975(93, 31, 124, 0),
    
    50
    -    OA_1976(70, 27, 97, 0),
    
    51
    -    OA_1977(53, 27, 80, 0),
    
    52
    -    OA_1978(46, 14, 60, 0),
    
    53
    -    OA_1979(64, 21, 86, 0),
    
    54
    -
    
    55
    -    OA_1980(318, 36, 352, 2),
    
    56
    -    OA_1981(298, 63, 361, 0),
    
    57
    -    OA_1982(184, 133, 317, 0),
    
    58
    -    OA_1983(218, 157, 375, 0),
    
    59
    -    OA_1984(121, 61, 182, 0),
    
    60
    -    OA_1985(93, 31, 124, 0),
    
    61
    -    OA_1986(70, 27, 97, 0),
    
    62
    -    OA_1987(53, 27, 80, 0),
    
    63
    -    OA_1988(46, 14, 60, 0),
    
    64
    -    OA_1989(64, 21, 86, 0),
    
    65
    -
    
    66
    -    OA_1990(318, 36, 352, 2),
    
    67
    -    OA_1991(298, 63, 361, 0),
    
    68
    -    OA_1992(184, 133, 317, 0),
    
    69
    -    OA_1993(218, 157, 375, 0),
    
    70
    -    OA_1994(121, 61, 182, 0),
    
    71
    -    OA_1995(93, 31, 124, 0),
    
    72
    -    OA_1996(70, 27, 97, 0),
    
    73
    -    OA_1997(53, 27, 80, 0),
    
    74
    -    OA_1998(46, 14, 60, 0),
    
    75
    -    OA_1999(64, 21, 86, 0),
    
    76 33
     
    
    34
    +    OA_1960(151, 0),
    
    35
    +    OA_1961(159, 0),
    
    36
    +    OA_1962(203, 0),
    
    37
    +    OA_1963(807, 0),
    
    38
    +    OA_1964(709, 0),
    
    39
    +    OA_1965(911, 0),
    
    40
    +    OA_1966(942, 0),
    
    41
    +    OA_1967(993, 0),
    
    42
    +    OA_1968(1339, 0),
    
    43
    +    OA_1969(453, 1179),
    
    44
    +    OA_1970(289, 970),
    
    45
    +    OA_1971(146, 1047),
    
    46
    +    OA_1972(143, 1069),
    
    47
    +    OA_1973(235, 890),
    
    48
    +    OA_1974(254, 948),
    
    49
    +    OA_1975(248, 709),
    
    50
    +    OA_1976(149, 692),
    
    51
    +    OA_1977(40, 761),
    
    52
    +    OA_1978(56, 766),
    
    53
    +    OA_1979(76, 618),
    
    54
    +    OA_1980(324, 299),
    
    55
    +    OA_1981(365, 280),
    
    56
    +    OA_1982(416, 247),
    
    57
    +    OA_1983(343, 257),
    
    58
    +    OA_1984(297, 111),
    
    59
    +    OA_1985(325, 115),
    
    60
    +    OA_1986(214, 121),
    
    61
    +    OA_1987(186, 165),
    
    62
    +    OA_1988(212, 156),
    
    63
    +    OA_1989(192, 154),
    
    64
    +    OA_1990(141, 192),
    
    65
    +    OA_1991(268, 0),
    
    66
    +    OA_1992(250, 0),
    
    67
    +    OA_1993(281, 2),
    
    68
    +    OA_1994(278, 0),
    
    69
    +    OA_1995(243, 3),
    
    70
    +    OA_1996(90, 142),
    
    71
    +    OA_1997(36, 178),
    
    72
    +    OA_1998(206, 1),
    
    73
    +    OA_1999(326, 2),
    
    77 74
         OA_2000(318, 36, 352, 2),
    
    78
    -    OA_2001(298, 63, 361, 0),
    
    79
    -    OA_2002(184, 133, 317, 0),
    
    80
    -    OA_2003(218, 157, 375, 0),
    
    81
    -    OA_2004(121, 61, 182, 0),
    
    75
    +    OA_2001(298, 63, 358, 3),
    
    76
    +    OA_2002(184, 133, 316, 1),
    
    77
    +    OA_2003(218, 157, 369, 6),
    
    78
    +    OA_2004(121, 61, 181, 1),
    
    82 79
         OA_2005(93, 31, 124, 0),
    
    83 80
         OA_2006(70, 27, 97, 0),
    
    84
    -    OA_2007(53, 27, 80, 0),
    
    81
    +    OA_2007(53, 27, 77, 3),
    
    85 82
         OA_2008(46, 14, 60, 0),
    
    86 83
         OA_2009(64, 21, 86, 0),
    
    87
    -
    
    88 84
         OA_2010(75, 13, 87, 0),
    
    89 85
         OA_2011(75, 13, 91, 1),
    
    90 86
         OA_2012(75, 13, 97, 0),
    
    91 87
         OA_2013(75, 13, 103, 0),
    
    92
    -    OA_2014(75, 13, 91, 0),
    
    93
    -    OA_2015(75, 13, 80, 8);
    
    88
    +    OA_2014(75, 13, 90, 0),
    
    89
    +    OA_2015(75, 13, 103, 0),
    
    90
    +    OA_2016(75, 13, 52, 55);
    
    94 91
     
    
    95 92
         private final int nbSafe;
    
    96 93
         private final int nbUnsafe;
    
    97 94
         private final int nbSafeWithoutWell;
    
    98 95
         private final int nbUnsafeWithoutWell;
    
    99 96
     
    
    97
    +    AtlanticOceanFixtures(int nbSafeWithoutWell, int nbUnsafeWithoutWell) {
    
    98
    +        this(nbSafeWithoutWell, nbUnsafeWithoutWell, nbSafeWithoutWell, nbUnsafeWithoutWell);
    
    99
    +    }
    
    100
    +
    
    100 101
         AtlanticOceanFixtures(int nbSafe, int nbUnsafe, int nbSafeWithoutWell, int nbUnsafeWithoutWell) {
    
    101 102
             this.nbSafe = nbSafe;
    
    102 103
             this.nbUnsafe = nbUnsafe;
    

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/IndianOceanFixtures.java
    ... ... @@ -10,12 +10,12 @@ package fr.ird.t3.actions.io.input;
    10 10
      * it under the terms of the GNU Affero General Public License as published by
    
    11 11
      * the Free Software Foundation, either version 3 of the License, or
    
    12 12
      * (at your option) any later version.
    
    13
    - * 
    
    13
    + *
    
    14 14
      * This program is distributed in the hope that it will be useful,
    
    15 15
      * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16 16
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17 17
      * GNU General Public License for more details.
    
    18
    - * 
    
    18
    + *
    
    19 19
      * You should have received a copy of the GNU Affero General Public License
    
    20 20
      * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    21 21
      * #L%
    
    ... ... @@ -30,33 +30,41 @@ import fr.ird.t3.actions.io.input.test.OceanFixtures;
    30 30
      */
    
    31 31
     public enum IndianOceanFixtures implements OceanFixtures {
    
    32 32
     
    
    33
    +    OI_1998(183, 1, 183, 1),
    
    34
    +    OI_1999(55, 65, 195, 2),
    
    33 35
         OI_2000(55, 65, 220, 0),
    
    34 36
         OI_2001(70, 118, 188, 0),
    
    35
    -    OI_2002(103, 125, 228, 0),
    
    36
    -    OI_2003(83, 136, 219, 0),
    
    37
    +    OI_2002(103, 125, 227, 1),
    
    38
    +    OI_2003(83, 136, 217, 2),
    
    37 39
         OI_2004(78, 118, 196, 0),
    
    38
    -    OI_2005(78, 110, 188, 0),
    
    40
    +    OI_2005(78, 110, 187, 1),
    
    39 41
         OI_2006(181, 12, 193, 0),
    
    40 42
         OI_2007(155, 12, 167, 0),
    
    41 43
         OI_2008(146, 34, 180, 0),
    
    42
    -    OI_2009(122, 19, 141, 0),
    
    44
    +    OI_2009(122, 19, 138, 3),
    
    43 45
         OI_2010(112, 0, 112, 0),
    
    44 46
         OI_2011(141, 0, 126, 0),
    
    45 47
         OI_2012(145, 0, 119, 0),
    
    46 48
         OI_2013(124, 0, 124, 0),
    
    47
    -    OI_2014(149, 0, 150, 0),
    
    48
    -    OI_2015(111, 1, 110, 1);
    
    49
    +    OI_2014(149, 0, 149, 1),
    
    50
    +    OI_2015(111, 1, 147, 0),
    
    51
    +    OI_2016(111, 1, 169, 0),
    
    52
    +    OI_2017(111, 1, 168, 4);
    
    49 53
     
    
    50 54
         private final int nbSafe;
    
    51 55
         private final int nbUnsafe;
    
    52 56
         private final int nbSafeWithoutWell;
    
    53
    -    private final int nbUnsafeWithoutwell;
    
    57
    +    private final int nbUnsafeWithoutWell;
    
    58
    +
    
    59
    +    IndianOceanFixtures(int nbSafe, int nbUnsafe) {
    
    60
    +        this(nbSafe, nbUnsafe, nbSafe, nbUnsafe);
    
    61
    +    }
    
    54 62
     
    
    55
    -    IndianOceanFixtures(int nbSafe, int nbUnsafe, int nbSafeWithoutWell, int nbUnsafeWithoutwell) {
    
    63
    +    IndianOceanFixtures(int nbSafe, int nbUnsafe, int nbSafeWithoutWell, int nbUnsafeWithoutWell) {
    
    56 64
             this.nbSafe = nbSafe;
    
    57 65
             this.nbUnsafe = nbUnsafe;
    
    58 66
             this.nbSafeWithoutWell = nbSafeWithoutWell;
    
    59
    -        this.nbUnsafeWithoutwell = nbUnsafeWithoutwell;
    
    67
    +        this.nbUnsafeWithoutWell = nbUnsafeWithoutWell;
    
    60 68
         }
    
    61 69
     
    
    62 70
         public int nbSafe() {
    
    ... ... @@ -72,7 +80,7 @@ public enum IndianOceanFixtures implements OceanFixtures {
    72 80
         }
    
    73 81
     
    
    74 82
         public int nbUnsafeWithoutWell() {
    
    75
    -        return nbUnsafeWithoutwell;
    
    83
    +        return nbUnsafeWithoutWell;
    
    76 84
         }
    
    77 85
     
    
    78 86
     }

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionAtlanticOceanIT.java
    ... ... @@ -23,6 +23,8 @@ package fr.ird.t3.actions.io.input.it;
    23 23
     import fr.ird.t3.actions.io.input.AnalyzeInputSourceAction;
    
    24 24
     import fr.ird.t3.actions.io.input.AtlanticOceanFixtures;
    
    25 25
     import fr.ird.t3.actions.io.input.test.MSAccessTestConfiguration;
    
    26
    +import fr.ird.t3.actions.io.input.test.OceanFixtures;
    
    27
    +import fr.ird.t3.entities.data.TripType;
    
    26 28
     import fr.ird.t3.io.input.avdth.v35.T3InputProviderAvdth35;
    
    27 29
     import org.junit.Ignore;
    
    28 30
     import org.junit.Test;
    
    ... ... @@ -33,9 +35,13 @@ import org.junit.Test;
    33 35
      * @author Tony Chemit - dev@tchemit.fr
    
    34 36
      * @since 1.0
    
    35 37
      */
    
    36
    -@Ignore
    
    37 38
     public class AnalyzeInputSourceActionAtlanticOceanIT extends AnalyzeInputSourceActionITSupport implements T3AVDTHV35TestAtlanticOcean {
    
    38 39
     
    
    40
    +    @Override
    
    41
    +    void testExecute(OceanFixtures fixture) throws Exception {
    
    42
    +        super.testExecute(fixture, TripType.LOGBOOKMISSING);
    
    43
    +    }
    
    44
    +
    
    39 45
         @Test
    
    40 46
         @Override
    
    41 47
         public void testExecute_OA_1960() throws Exception {
    
    ... ... @@ -370,6 +376,11 @@ public class AnalyzeInputSourceActionAtlanticOceanIT extends AnalyzeInputSourceA
    370 376
         public void testExecute_OA_2015() throws Exception {
    
    371 377
             testExecute(AtlanticOceanFixtures.OA_2015);
    
    372 378
         }
    
    379
    +    @Test
    
    380
    +    @Override
    
    381
    +    public void testExecute_OA_2016() throws Exception {
    
    382
    +        testExecute(AtlanticOceanFixtures.OA_2016);
    
    383
    +    }
    
    373 384
     
    
    374 385
         @Override
    
    375 386
         protected MSAccessTestConfiguration createConfiguration() {
    

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionAtlanticOceanRecentIT.java
    1
    +/*
    
    2
    + * #%L
    
    3
    + * T3 :: Input AVDTH v 35
    
    4
    + * %%
    
    5
    + * Copyright (C) 2010 - 2018 IRD, Code Lutin, Ultreia.io
    
    6
    + * %%
    
    7
    + * This program is free software: you can redistribute it and/or modify
    
    8
    + * it under the terms of the GNU Affero General Public License as published by
    
    9
    + * the Free Software Foundation, either version 3 of the License, or
    
    10
    + * (at your option) any later version.
    
    11
    + *
    
    12
    + * This program is distributed in the hope that it will be useful,
    
    13
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    + * GNU General Public License for more details.
    
    16
    + *
    
    17
    + * You should have received a copy of the GNU Affero General Public License
    
    18
    + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    19
    + * #L%
    
    20
    + */
    
    21
    +package fr.ird.t3.actions.io.input.it;
    
    22
    +
    
    23
    +import fr.ird.t3.actions.io.input.AnalyzeInputSourceAction;
    
    24
    +import fr.ird.t3.actions.io.input.AtlanticOceanFixtures;
    
    25
    +import fr.ird.t3.actions.io.input.test.MSAccessTestConfiguration;
    
    26
    +import fr.ird.t3.io.input.avdth.v35.T3InputProviderAvdth35;
    
    27
    +import org.junit.Test;
    
    28
    +
    
    29
    +/**
    
    30
    + * Tests the action {@link AnalyzeInputSourceAction}.
    
    31
    + *
    
    32
    + * @author Tony Chemit - dev@tchemit.fr
    
    33
    + * @since 1.0
    
    34
    + */
    
    35
    +public class AnalyzeInputSourceActionAtlanticOceanRecentIT extends AnalyzeInputSourceActionITSupport implements T3AVDTHV35TestAtlanticOceanRecent {
    
    36
    +
    
    37
    +//    @Override
    
    38
    +//    void testExecute(OceanFixtures fixture) throws Exception {
    
    39
    +//        super.testExecute(fixture, TripType.LOGBOOKMISSING);
    
    40
    +//    }
    
    41
    +
    
    42
    +    @Test
    
    43
    +    @Override
    
    44
    +    public void testExecute_OA_1998() throws Exception {
    
    45
    +        testExecute(AtlanticOceanFixtures.OA_1998);
    
    46
    +    }
    
    47
    +
    
    48
    +    @Test
    
    49
    +    @Override
    
    50
    +    public void testExecute_OA_1999() throws Exception {
    
    51
    +        testExecute(AtlanticOceanFixtures.OA_1999);
    
    52
    +    }
    
    53
    +
    
    54
    +    @Test
    
    55
    +    @Override
    
    56
    +    public void testExecute_OA_2000() throws Exception {
    
    57
    +        testExecute(AtlanticOceanFixtures.OA_2000);
    
    58
    +    }
    
    59
    +
    
    60
    +    @Test
    
    61
    +    @Override
    
    62
    +    public void testExecute_OA_2001() throws Exception {
    
    63
    +        testExecute(AtlanticOceanFixtures.OA_2001);
    
    64
    +    }
    
    65
    +
    
    66
    +    @Test
    
    67
    +    @Override
    
    68
    +    public void testExecute_OA_2002() throws Exception {
    
    69
    +        testExecute(AtlanticOceanFixtures.OA_2002);
    
    70
    +    }
    
    71
    +
    
    72
    +    @Test
    
    73
    +    @Override
    
    74
    +    public void testExecute_OA_2003() throws Exception {
    
    75
    +        testExecute(AtlanticOceanFixtures.OA_2003);
    
    76
    +    }
    
    77
    +
    
    78
    +    @Test
    
    79
    +    @Override
    
    80
    +    public void testExecute_OA_2004() throws Exception {
    
    81
    +        testExecute(AtlanticOceanFixtures.OA_2004);
    
    82
    +    }
    
    83
    +
    
    84
    +    @Test
    
    85
    +    @Override
    
    86
    +    public void testExecute_OA_2005() throws Exception {
    
    87
    +        testExecute(AtlanticOceanFixtures.OA_2005);
    
    88
    +    }
    
    89
    +
    
    90
    +    @Test
    
    91
    +    @Override
    
    92
    +    public void testExecute_OA_2006() throws Exception {
    
    93
    +        testExecute(AtlanticOceanFixtures.OA_2006);
    
    94
    +    }
    
    95
    +
    
    96
    +    @Test
    
    97
    +    @Override
    
    98
    +    public void testExecute_OA_2007() throws Exception {
    
    99
    +        testExecute(AtlanticOceanFixtures.OA_2007);
    
    100
    +    }
    
    101
    +
    
    102
    +    @Test
    
    103
    +    @Override
    
    104
    +    public void testExecute_OA_2008() throws Exception {
    
    105
    +        testExecute(AtlanticOceanFixtures.OA_2008);
    
    106
    +    }
    
    107
    +
    
    108
    +    @Test
    
    109
    +    @Override
    
    110
    +    public void testExecute_OA_2009() throws Exception {
    
    111
    +        testExecute(AtlanticOceanFixtures.OA_2009);
    
    112
    +    }
    
    113
    +
    
    114
    +    @Test
    
    115
    +    @Override
    
    116
    +    public void testExecute_OA_2010() throws Exception {
    
    117
    +        testExecute(AtlanticOceanFixtures.OA_2010);
    
    118
    +    }
    
    119
    +
    
    120
    +    @Test
    
    121
    +    @Override
    
    122
    +    public void testExecute_OA_2011() throws Exception {
    
    123
    +        testExecute(AtlanticOceanFixtures.OA_2011);
    
    124
    +    }
    
    125
    +
    
    126
    +    @Test
    
    127
    +    @Override
    
    128
    +    public void testExecute_OA_2012() throws Exception {
    
    129
    +        testExecute(AtlanticOceanFixtures.OA_2012);
    
    130
    +    }
    
    131
    +
    
    132
    +    @Test
    
    133
    +    @Override
    
    134
    +    public void testExecute_OA_2013() throws Exception {
    
    135
    +        testExecute(AtlanticOceanFixtures.OA_2013);
    
    136
    +    }
    
    137
    +
    
    138
    +    @Test
    
    139
    +    @Override
    
    140
    +    public void testExecute_OA_2014() throws Exception {
    
    141
    +        testExecute(AtlanticOceanFixtures.OA_2014);
    
    142
    +    }
    
    143
    +
    
    144
    +    @Test
    
    145
    +    @Override
    
    146
    +    public void testExecute_OA_2015() throws Exception {
    
    147
    +        testExecute(AtlanticOceanFixtures.OA_2015);
    
    148
    +    }
    
    149
    +
    
    150
    +    @Test
    
    151
    +    @Override
    
    152
    +    public void testExecute_OA_2016() throws Exception {
    
    153
    +        testExecute(AtlanticOceanFixtures.OA_2016);
    
    154
    +    }
    
    155
    +
    
    156
    +    @Override
    
    157
    +    protected MSAccessTestConfiguration createConfiguration() {
    
    158
    +        return new MSAccessTestConfiguration("testExecute_([^_]*)_(.*)", "%s_%s_V35.mdb", T3InputProviderAvdth35.ID);
    
    159
    +    }
    
    160
    +}

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/ImportInputSourceActionAtlanticOceanIT.java
    ... ... @@ -379,5 +379,11 @@ public class ImportInputSourceActionAtlanticOceanIT extends ImportInputSourceAct
    379 379
             testExecute(AtlanticOceanFixtures.OA_2015);
    
    380 380
         }
    
    381 381
     
    
    382
    +    @Override
    
    383
    +    @Test
    
    384
    +    public void testExecute_OA_2016() throws Exception {
    
    385
    +        testExecute(AtlanticOceanFixtures.OA_2016);
    
    386
    +    }
    
    387
    +
    
    382 388
     
    
    383 389
     }

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/T3AVDTHV35TestAtlanticOcean.java
    ... ... @@ -26,7 +26,7 @@ package fr.ird.t3.actions.io.input.it;
    26 26
      * @author Tony Chemit - dev@tchemit.fr
    
    27 27
      * @since 1.0
    
    28 28
      */
    
    29
    -public interface T3AVDTHV35TestAtlanticOcean {
    
    29
    +public interface T3AVDTHV35TestAtlanticOcean extends T3AVDTHV35TestAtlanticOceanRecent {
    
    30 30
     
    
    31 31
         void testExecute_OA_1960() throws Exception;
    
    32 32
     
    
    ... ... @@ -104,40 +104,4 @@ public interface T3AVDTHV35TestAtlanticOcean {
    104 104
     
    
    105 105
         void testExecute_OA_1997() throws Exception;
    
    106 106
     
    
    107
    -    void testExecute_OA_1998() throws Exception;
    
    108
    -
    
    109
    -    void testExecute_OA_1999() throws Exception;
    
    110
    -
    
    111
    -    void testExecute_OA_2000() throws Exception;
    
    112
    -
    
    113
    -    void testExecute_OA_2001() throws Exception;
    
    114
    -
    
    115
    -    void testExecute_OA_2002() throws Exception;
    
    116
    -
    
    117
    -    void testExecute_OA_2003() throws Exception;
    
    118
    -
    
    119
    -    void testExecute_OA_2004() throws Exception;
    
    120
    -
    
    121
    -    void testExecute_OA_2005() throws Exception;
    
    122
    -
    
    123
    -    void testExecute_OA_2006() throws Exception;
    
    124
    -
    
    125
    -    void testExecute_OA_2007() throws Exception;
    
    126
    -
    
    127
    -    void testExecute_OA_2008() throws Exception;
    
    128
    -
    
    129
    -    void testExecute_OA_2009() throws Exception;
    
    130
    -
    
    131
    -    void testExecute_OA_2010() throws Exception;
    
    132
    -
    
    133
    -    void testExecute_OA_2011() throws Exception;
    
    134
    -
    
    135
    -    void testExecute_OA_2012() throws Exception;
    
    136
    -
    
    137
    -    void testExecute_OA_2013() throws Exception;
    
    138
    -
    
    139
    -    void testExecute_OA_2014() throws Exception;
    
    140
    -
    
    141
    -    void testExecute_OA_2015() throws Exception;
    
    142
    -
    
    143 107
     }

  • t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/T3AVDTHV35TestAtlanticOceanRecent.java
    1
    +/*
    
    2
    + * #%L
    
    3
    + * T3 :: Input AVDTH v 35
    
    4
    + * %%
    
    5
    + * Copyright (C) 2010 - 2018 IRD, Code Lutin, Ultreia.io
    
    6
    + * %%
    
    7
    + * This program is free software: you can redistribute it and/or modify
    
    8
    + * it under the terms of the GNU Affero General Public License as published by
    
    9
    + * the Free Software Foundation, either version 3 of the License, or
    
    10
    + * (at your option) any later version.
    
    11
    + *
    
    12
    + * This program is distributed in the hope that it will be useful,
    
    13
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    + * GNU General Public License for more details.
    
    16
    + *
    
    17
    + * You should have received a copy of the GNU Affero General Public License
    
    18
    + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    19
    + * #L%
    
    20
    + */
    
    21
    +package fr.ird.t3.actions.io.input.it;
    
    22
    +
    
    23
    +/**
    
    24
    + * Contract to use for all tests on avdth database
    
    25
    + *
    
    26
    + * @author Tony Chemit - dev@tchemit.fr
    
    27
    + * @since 1.0
    
    28
    + */
    
    29
    +public interface T3AVDTHV35TestAtlanticOceanRecent {
    
    30
    +
    
    31
    +    void testExecute_OA_1998() throws Exception;
    
    32
    +
    
    33
    +    void testExecute_OA_1999() throws Exception;
    
    34
    +
    
    35
    +    void testExecute_OA_2000() throws Exception;
    
    36
    +
    
    37
    +    void testExecute_OA_2001() throws Exception;
    
    38
    +
    
    39
    +    void testExecute_OA_2002() throws Exception;
    
    40
    +
    
    41
    +    void testExecute_OA_2003() throws Exception;
    
    42
    +
    
    43
    +    void testExecute_OA_2004() throws Exception;
    
    44
    +
    
    45
    +    void testExecute_OA_2005() throws Exception;
    
    46
    +
    
    47
    +    void testExecute_OA_2006() throws Exception;
    
    48
    +
    
    49
    +    void testExecute_OA_2007() throws Exception;
    
    50
    +
    
    51
    +    void testExecute_OA_2008() throws Exception;
    
    52
    +
    
    53
    +    void testExecute_OA_2009() throws Exception;
    
    54
    +
    
    55
    +    void testExecute_OA_2010() throws Exception;
    
    56
    +
    
    57
    +    void testExecute_OA_2011() throws Exception;
    
    58
    +
    
    59
    +    void testExecute_OA_2012() throws Exception;
    
    60
    +
    
    61
    +    void testExecute_OA_2013() throws Exception;
    
    62
    +
    
    63
    +    void testExecute_OA_2014() throws Exception;
    
    64
    +
    
    65
    +    void testExecute_OA_2015() throws Exception;
    
    66
    +
    
    67
    +    void testExecute_OA_2016() throws Exception;
    
    68
    +
    
    69
    +}