public void RefMinorSite_have_correct_behavior()
        {
            var chrom = new Mock <IChromosome>();

            chrom.Setup(x => x.EnsemblName).Returns("1");
            var variant = ReferenceVariantCreator.Create(chrom.Object, 100, 100, "A", ".", "T");

            Assert.True(variant.IsRefMinor);
            Assert.NotNull(variant.Behavior);
            Assert.True(variant.Behavior.NeedFlankingTranscript);
            Assert.True(variant.Behavior.NeedSaPosition);
            Assert.False(variant.Behavior.NeedSaInterval);
            Assert.False(variant.Behavior.ReducedTranscriptAnnotation);
            Assert.False(variant.Behavior.StructuralVariantConsequence);

            var variant2 = ReferenceVariantCreator.Create(chrom.Object, 101, 101, "A", ".", null);

            Assert.False(variant2.IsRefMinor);
            Assert.Null(variant2.Behavior);

            var variant3 = ReferenceVariantCreator.Create(chrom.Object, 100, 110, "A", ".", null);

            Assert.False(variant3.IsRefMinor);
            Assert.Null(variant3.Behavior);
        }
        public void ReferenceVariant_have_annotationBehaviorNull()
        {
            var chrom = new Mock <IChromosome>();

            chrom.Setup(x => x.EnsemblName).Returns("1");
            var variant = ReferenceVariantCreator.Create(chrom.Object, 100, 101, "A", ".", null);

            Assert.False(variant.IsRefMinor);
            Assert.Null(variant.Behavior);
        }
 public void Create_MultiplePositions_HasGlobalMajorAllele_ReturnNull()
 {
     IVariant[] variants = ReferenceVariantCreator.Create(_vidCreator, Sequence, ChromosomeUtilities.Chr1, 100, 101, "A", ".", "T");
     Assert.Null(variants);
 }
 private IVariant GetVariant(int start, int end, string refAllele, string altAllele, string globalMajorAllele)
 {
     IVariant[] variants = ReferenceVariantCreator.Create(_vidCreator, Sequence, ChromosomeUtilities.Chr1, start, end, refAllele, altAllele, globalMajorAllele);
     Assert.Single(variants);
     return(variants[0]);
 }
 public void Create_SinglePosition_NoGlobalMajorAllele_ReturnNull()
 {
     IVariant[] variants = ReferenceVariantCreator.Create(_vidCreator, Sequence, ChromosomeUtilities.Chr1, 100, 100, "A", ".", null);
     Assert.Null(variants);
 }