コード例 #1
0
        public void MutantService_VerifyIsMutant_WrongParameters_Fails()
        {
            //Arrange
            MutantService service = GetMutantService();

            //Action && Asserts
            Assert.ThrowsException <ArgumentException>(() => service.VerifyIsMutant(null));
            Assert.ThrowsException <ArgumentException>(() => service.VerifyIsMutant(new string[] { }));
        }
コード例 #2
0
        public void MutantService_VerifyIsMutant_DnaMutant5x5LowerLetters_Succeeds()
        {
            //Arrange
            MutantService service = GetMutantService();

            string[] dna =
            {
                "AACCT",
                "ACTGC",
                "ccccG",
                "GATCC",
                "TTCGA",
            };

            //Action
            bool result = service.VerifyIsMutant(dna);

            //Asserts
            Assert.IsTrue(result);
        }
コード例 #3
0
        public void MutantService_VerifyIsMutant_DnaMutant5x5DiagonalLeft_Succeeds()
        {
            //Arrange
            MutantService service = GetMutantService();

            string[] dna =
            {
                "AACCT",
                "ACTGT",
                "CCATG",
                "GATCC",
                "TTCGA",
            };

            //Action
            bool result = service.VerifyIsMutant(dna);

            //Asserts
            Assert.IsTrue(result);
        }
コード例 #4
0
        public void MutantService_VerifyIsMutant_DnaNoMutant5x5_Succeeds()
        {
            //Arrange
            MutantService service = GetMutantService();

            string[] dna =
            {
                "AACCT",
                "ACTGC",
                "CCTGG",
                "GATCC",
                "TTCGA",
            };

            //Action
            bool result = service.VerifyIsMutant(dna);

            //Asserts
            Assert.IsFalse(result);
        }