예제 #1
0
        public void Annotate_noAnnotation()
        {
            var annotationProvider = new Mock <IGeneAnnotationProvider>();

            annotationProvider.Setup(x => x.Annotate(It.IsAny <string>())).Returns((IAnnotatedGene)null);

            var observedResult = GeneAnnotator.Annotate(new[] { "gene1", "gene2" }, annotationProvider.Object);

            Assert.Empty(observedResult);
        }
예제 #2
0
        public void Annotate()
        {
            var annotationProvider = new Mock <IGeneAnnotationProvider>();

            annotationProvider.Setup(x => x.Annotate("gene2")).Returns((IAnnotatedGene)null);
            var geneAnnotation = new Mock <IAnnotatedGene>();

            annotationProvider.Setup(x => x.Annotate("gene1")).Returns(geneAnnotation.Object);


            var observedResult = GeneAnnotator.Annotate(new[] { "gene1", "gene2" }, annotationProvider.Object);

            Assert.Single(observedResult);
            Assert.Equal(geneAnnotation.Object, observedResult[0]);
        }
예제 #3
0
 public IList <IAnnotatedGene> GetAnnotatedGenes() => GeneAnnotator.Annotate(_affectedGenes, _geneAnnotationProvider);