Esempio n. 1
0
        public void Contains_DoesNotContain_IsFalse()
        {
            // arrange
            var list = new MappedList(_testMap);

            list.SetValues(_testValues);

            // act
            var result = list.Contains("bat");

            // assert
            Assert.False(result);
        }
Esempio n. 2
0
        public void Contains_DoesContain_IsTrue()
        {
            // arrange
            var list = new MappedList(_testMap);

            list.SetValues(_testValues);

            // act
            var result = list.Contains("foo");

            // assert
            Assert.True(result);
        }
        public virtual PeptideModifications GetDocModifications(SrmDocument document)
        {
            var lightMods = new MappedList <string, StaticMod>();

            lightMods.AddRange(DefSetStatic);
            var heavyMods = new MappedList <string, StaticMod>();

            heavyMods.AddRange(DefSetHeavy);
            foreach (var matchPair in Matches)
            {
                var lightMod = matchPair.Value.StructuralMod;
                if (lightMod != null && !lightMods.Contains(lightMod))
                {
                    lightMods.Add(lightMod.ChangeExplicit(true));
                }
                var heavyMod = matchPair.Value.HeavyMod;
                if (heavyMod != null && !heavyMods.Contains(heavyMod))
                {
                    heavyMods.Add(heavyMod.ChangeExplicit(true));
                }
            }
            return(document.Settings.PeptideSettings.Modifications.DeclareExplicitMods(document, lightMods, heavyMods));
        }
 public virtual PeptideModifications GetDocModifications(SrmDocument document)
 {
     var lightMods = new MappedList<string, StaticMod>();
     lightMods.AddRange(DefSetStatic);
     var heavyMods = new MappedList<string, StaticMod>();
     heavyMods.AddRange(DefSetHeavy);
     foreach (var matchPair in Matches)
     {
         var lightMod = matchPair.Value.StructuralMod;
         if (lightMod != null && !lightMods.Contains(lightMod))
             lightMods.Add(lightMod.ChangeExplicit(true));
         var heavyMod = matchPair.Value.HeavyMod;
         if (heavyMod != null && !heavyMods.Contains(heavyMod))
             heavyMods.Add(heavyMod.ChangeExplicit(true));
     }
     return document.Settings.PeptideSettings.Modifications.DeclareExplicitMods(document, lightMods, heavyMods);
 }