/*
 * =====================================
 *  Copyright (c) 2019 NextMove Software
 * =====================================
 */

package org.openscience.cdk.app;

import org.hamcrest.CoreMatchers;
import org.junit.Test;
import org.openscience.cdk.exception.InvalidSmilesException;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.silent.SilentChemObjectBuilder;
import org.openscience.cdk.smiles.SmilesParser;

import static org.junit.Assert.*;

public class MolOpTest {

  @Test public void NO2() throws InvalidSmilesException {
    SmilesParser   smipar = new SmilesParser(SilentChemObjectBuilder.getInstance());
    IAtomContainer mol    = smipar.parseSmiles("[Co][N+]([O-])(=O)");
    MolOp.perceiveDativeBonds(mol);
    int count = 0;
    for (IBond bond : mol.bonds()) {
      if (bond.getDisplay() != IBond.Display.Solid)
        count++;
    }
    assertThat(count, CoreMatchers.is(1));
  }

}
@@ -276,16 +276,61 @@
 eption;%0A
+import org.openscience.cdk.interfaces.IAtom;%0A
 import o
@@ -1017,9 +1017,435 @@
 );%0A  %7D%0A%0A
+  @Test public void NO3() throws InvalidSmilesException %7B%0A    SmilesParser   smipar = new SmilesParser(SilentChemObjectBuilder.getInstance());%0A    IAtomContainer mol    = smipar.parseSmiles(%22%5BO-%5D%5BN+%5D(%5BO-%5D)=O%22);%0A    MolOp.perceiveDativeBonds(mol);%0A    int count = 0;%0A    for (IBond bond : mol.bonds()) %7B%0A      if (bond.getDisplay() != IBond.Display.Solid)%0A        count++;%0A    %7D%0A    assertThat(count, CoreMatchers.is(1));%0A  %7D%0A%0A
 %7D

Add test case