public void Annotate_mito_GRCh37() { var position = new Mock <IPosition>(); position.SetupGet(x => x.Variants).Returns(GetVariants); position.SetupGet(x => x.Chromosome).Returns(ChromosomeUtilities.ChrM); var csProvider = new Mock <IAnnotationProvider>(); csProvider.SetupGet(x => x.Assembly).Returns(GenomeAssembly.GRCh37); csProvider.Setup(x => x.Annotate(It.IsAny <IAnnotatedPosition>())). Callback((IAnnotatedPosition x) => { x.CytogeneticBand = "testCytoBand"; }); var taProvider = new Mock <IAnnotationProvider>(); taProvider.SetupGet(x => x.Assembly).Returns(GenomeAssembly.GRCh37); taProvider.Setup(x => x.Annotate(It.IsAny <IAnnotatedPosition>())).Callback((IAnnotatedPosition x) => { });//do nothing var annotator = new Annotator(taProvider.Object, null, null, csProvider.Object, null, null); annotator.EnableMitochondrialAnnotation(); var annotatedPosition = annotator.Annotate(position.Object); Assert.NotNull(annotatedPosition.CytogeneticBand); }
public void Annotate_null_position() { var annotator = new Annotator(null, null, null, null, null, null); var annotatedPosition = annotator.Annotate(null); Assert.Null(annotatedPosition); }
public void ManualAnnotation() { // [You can set these globally in the config file too] // Enable Annotated Execution. Manager.Settings.AnnotateExecution = true; // Slow down test execution so we can visually track the actions on the page. Manager.Settings.ExecutionDelay = 1000; // half a second wait between actions. // Launch an instance of the browser Manager.LaunchNewBrowser(); // Navigate to the test page ActiveBrowser.NavigateTo(Path.Combine(TestContext.TestDeploymentDir, TESTPAGE)); Annotator myAnnotator = new Annotator(ActiveBrowser); myAnnotator.Annotate("This annotation message appears at the top of the browser document window"); myAnnotator.Annotate("This annotation message appears at the top left corner of the browser document window", 350, OffsetReference.TopLeftCorner); myAnnotator.Annotate(new Point(100, 300), "This annotation message appears under the point at 100,300 in the browser document window"); myAnnotator.Annotate(Find.ById("btn1").GetRectangle(), "This annotation highlights the Color On button"); }
// Update is called once per frame void Update() { count++; if (count % 10 == 0) { this.placements.MakePlaceRandomly(this.komaList); var nowDatetime = DateTime.Now.ToString("yyyyMMddHHmmssfff"); var annotationFileName = "C:\\Users\\rei\\Desktop\\TrueTrainingData\\annotations\\" + nowDatetime + ".xml"; var imageFileName = "C:\\Users\\rei\\Desktop\\TrueTrainingData\\images\\" + nowDatetime + ".png"; Annotator.Annotate(this.komaList, annotationFileName); ScreenCapture.CaptureScreenshot(imageFileName); this.placements.Reset(); this.lightManager.SetLightRandomly(); } }
public void PlayWithAnnotator() { manager.ActiveBrowser.NavigateTo( "http://automatetheplanet.com/healthy-diet-menu-generator/"); HtmlImage healthyBurgerImage = manager.ActiveBrowser.Find.ByXPath <HtmlImage>( "/html/body/div[1]/div[3]/section/article/div/div[2]/a/img"); HtmlInputCheckBox additionalSugarCheckbox = manager.ActiveBrowser.Find.ById <HtmlInputCheckBox>("ninja_forms_field_18"); additionalSugarCheckbox.Check( isChecked: true, invokeOnChange: true, invokeOnClickChanged: true); // Add rectangle around element + custom message Annotator annotator = new Annotator(manager.ActiveBrowser); annotator.Annotate( healthyBurgerImage.GetRectangle(), "This is the most healthy meal EVER! Honestly!"); }
public void Annotate_conservation_annotation() { var position = new Mock <IPosition>(); position.SetupGet(x => x.Variants).Returns(GetMitoVariants); position.SetupGet(x => x.Chromosome).Returns(new Chromosome("chr1", "1", 0)); var csProvider = new Mock <IAnnotationProvider>(); csProvider.SetupGet(x => x.Assembly).Returns(GenomeAssembly.GRCh37); csProvider.Setup(x => x.Annotate(It.IsAny <IAnnotatedPosition>())). Callback((IAnnotatedPosition x) => { x.CytogeneticBand = "testCytoBand"; }); var taProvider = new Mock <IAnnotationProvider>(); taProvider.SetupGet(x => x.Assembly).Returns(GenomeAssembly.GRCh37); taProvider.Setup(x => x.Annotate(It.IsAny <IAnnotatedPosition>())).Callback((IAnnotatedPosition x) => { });//do nothing var annotator = new Annotator(taProvider.Object, null, null, csProvider.Object, null); var annotatedPosition = annotator.Annotate(position.Object); Assert.Equal("testCytoBand", annotatedPosition.CytogeneticBand); }