Пример #1
0
        public void DnaPairs_Valid_CheckReturnsEmptyWhenPassedEmptyString()
        {
            // arrange
            string empty = String.Empty;

            // act
            var dnaPairs = new DnaPairs(empty);

            // assert
            Assert.Empty(dnaPairs.pairsArr);
        }
Пример #2
0
        public void DnaPairs_Valid_ShouldWorkWithUpperAndLowerCase()
        {
            // arrange
            string dnaString = "aTCg";

            char[][] expectedArr = new char[][] { new char[] { 'A', 'T' }, new char[] { 'T', 'A' }, new char[] { 'C', 'G' }, new char[] { 'G', 'C' } };

            // act
            var dnaPairs = new DnaPairs(dnaString);

            // arrange
            Assert.Equal(dnaPairs.pairsArr, expectedArr);
        }
Пример #3
0
        public void DnaPairs_Valid_ShouldThrowAwayInvalidChars()
        {
            // arrange
            string dnaString = "LATZZCGY";

            char[][] expectedArr = new char[][] { new char[] { 'A', 'T' }, new char[] { 'T', 'A' }, new char[] { 'C', 'G' }, new char[] { 'G', 'C' } };

            // act
            var dnaPairs = new DnaPairs(dnaString);

            // arrange
            Assert.Equal(dnaPairs.pairsArr, expectedArr);
        }
Пример #4
0
        public void DnaPairs_Valid_CheckReturnsAllKeyValuePairsWhenPassedStringWithSeveral()
        {
            // arrange
            string dnaString = "ATCG";

            char[][] expectedArr = new char[][] { new char[] { 'A', 'T' }, new char[] { 'T', 'A' }, new char[] { 'C', 'G' }, new char[] { 'G', 'C' } };

            // act
            var dnaPairs = new DnaPairs(dnaString);

            // arrange
            Assert.Equal(dnaPairs.pairsArr, expectedArr);
        }
Пример #5
0
        public void DnaPairs_Valid_CheckReturnsTwoKeyValueArrWhenPassedTwoValues()
        {
            // arrange
            string dnaString = "AG";

            char[][] expectedArr = new char[][] { new char[] { 'A', 'T' }, new char[] { 'G', 'C' } };

            // act
            var dnaPairs = new DnaPairs(dnaString);

            // arrange
            Assert.Equal(dnaPairs.pairsArr, expectedArr);
        }
Пример #6
0
        public void DnaPairs_Valid_CheckReturnsPairValueWhenPassedOneDNAValue()
        {
            // arrange
            string dnaString = "G";

            char[][] expectedArr = new char[][] { new char[] { 'G', 'C' } };

            // act
            var dnaPairs = new DnaPairs(dnaString);

            // assert
            Assert.Equal(dnaPairs.pairsArr, expectedArr);
        }