Exemple #1
0
        public void CheckStringHasUniqueChars(string @string, bool expectedResult)
        {
            var stringQuestions = new StringQuestions();

            var result = stringQuestions.IsStringHasUniqueChars(@string);

            result.Should().Be(expectedResult);
        }
Exemple #2
0
        public void CreateAllPermutaionOfOneString(string input, string[] expected)
        {
            var stringQuestions = new StringQuestions();

            var result = stringQuestions.GetAllPermutation(input);

            result.Should().BeEquivalentTo(expected);
        }
        public void FirstUniqueChar_abcdabbdddd_Should_Return_2()
        {
            // Arrange

            // Act
            var result = StringQuestions.FirstUniqueChar("abcdabbdddd");

            // Assert
            Assert.AreEqual(2, result);
        }
        public void FirstUniqueChar_loveleetcode_Should_Return_2()
        {
            // Arrange

            // Act
            var result = StringQuestions.FirstUniqueChar("loveleetcode");

            // Assert
            Assert.AreEqual(2, result);
        }
Exemple #5
0
 public StringQuestionsTest()
 {
     _stingQuestion = new StringQuestions();
 }