add DDAMsMsInfo save/load test
@@ -26,6 +26,7 @@ import io.github.mzmine.datamodel.Scan;
import io.github.mzmine.datamodel.features.ModularFeature;
import io.github.mzmine.datamodel.features.ModularFeatureList;
import io.github.mzmine.datamodel.features.ModularFeatureListRow;
+import io.github.mzmine.datamodel.features.types.MsMsInfoType;
import io.github.mzmine.datamodel.features.types.annotations.LipidMatchListType;
import io.github.mzmine.datamodel.features.types.annotations.SpectralLibraryMatchesType;
import io.github.mzmine.datamodel.features.types.numbers.BestFragmentScanNumberType;
@@ -34,6 +35,7 @@ import io.github.mzmine.datamodel.features.types.numbers.FragmentScanNumbersType
import io.github.mzmine.datamodel.impl.DDAMsMsInfoImpl;
import io.github.mzmine.datamodel.impl.SimpleScan;
import io.github.mzmine.datamodel.msms.ActivationMethod;
+import io.github.mzmine.datamodel.msms.MsMsInfo;
import io.github.mzmine.modules.dataprocessing.id_lipididentification.lipids.LipidClasses;
import io.github.mzmine.modules.dataprocessing.id_lipididentification.lipids.MolecularSpeciesLevelAnnotation;
import io.github.mzmine.modules.dataprocessing.id_lipididentification.lipids.SpeciesLevelAnnotation;
@@ -56,6 +58,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import javafx.scene.paint.Color;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
@@ -113,6 +116,21 @@ public class RegularScanTypesTest {
flist.setSelectedScans(file, scans);
}
+ @Test
+ void testDDAMsMsInfo() {
+ var type = new MsMsInfoType();
+
+ final List<MsMsInfo> msMsInfos = List.of(
+ new DDAMsMsInfoImpl(550, 1, 30f, null, null, 2, ActivationMethod.HCD,
+ Range.closed(500d, 600d)),
+ new DDAMsMsInfoImpl(550, null, null, null, null, 2, ActivationMethod.UNKNOWN,
+ Range.closed(500d, 600d)));
+
+ Assertions.assertTrue(msMsInfos.size() > 0);
+
+ DataTypeTestUtils.simpleDataTypeSaveLoadTest(type, msMsInfos);
+ }
+
@Test
void bestScanNumberTypeTest() {
BestScanNumberType type = new BestScanNumberType();
