コード例 #1
0
        public void CalculateFrequency_Returns_Letter_Counts()
        {
            // Arrange
            string input = "abba";
            Dictionary <char, int> inputFrequency = new Dictionary <char, int>();

            inputFrequency.Add('a', 2);
            inputFrequency.Add('b', 2);

            // Act
            Dictionary <char, int> frequency = AnagramChecker.CalculateFrequency(input);

            // Assert
            Assert.AreEqual(inputFrequency, frequency);
        }