Пример #1
0
        public override void ContainsGeneValueReturnsFalseForWrongType()
        {
            IDomain domain = new CategoricalDomain <int>(new List <int> {
                1
            });

            Assert.False(
                domain.ContainsGeneValue(new Allele <double>(1.0)),
                $"Wrong type is categorized as legal gene value.");
        }
Пример #2
0
        public void ContainsGeneValueReturnsTrueForSubtype()
        {
            DomainBase <object> objectDomain = new CategoricalDomain <object>(new List <object> {
                "a1"
            });

            var stringAllele = new Allele <string>("a1");

            Assert.True(
                objectDomain.ContainsGeneValue(stringAllele),
                $"{stringAllele} was not identified as legal value of domain {objectDomain}.");
        }