Exemplo n.º 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.");
        }
Exemplo n.º 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}.");
        }