public void OpenAllNTest() { var annotators = new Annotator[2]; annotators[0] = new Annotator { Name = "atr", Stat = Stat.Read }; annotators[1] = new Annotator { Name = "hrv", Stat = Stat.Read }; Annotator.OpenAll(annotators, "data/100s"); int counter = 0; foreach (var annotator in annotators) { Assert.IsTrue(annotator.IsOpen); Assert.AreEqual(counter, annotator.Number); counter++; } Annotator.CloseAll(); foreach (var annotator in annotators) { Assert.IsFalse(annotator.IsOpen); } }
public void OpenAll0Test() { var annotators = new Annotator[0]; Annotator.OpenAll(annotators, "data/100s"); Annotator.CloseAll(); }
public void OpenAllNWithInvalidAnnotatorTest() { var annotators = new Annotator[2]; annotators[0] = new Annotator { Name = "atr", Stat = Stat.Read }; // annotators[1] has not been set Annotator.OpenAll(annotators, "data/100s"); }
public void OpenAll1Test() { var annotators = new Annotator[1]; annotators[0] = new Annotator { Name = "atr", Stat = Stat.Read }; Annotator.OpenAll(annotators, "data/100s"); Assert.IsTrue(annotators[0].IsOpen); Annotator.CloseAll(); Assert.IsFalse(annotators[0].IsOpen); }