Ad
  • Custom User Avatar

    Not a kata issue then.

  • Custom User Avatar

    You should have rewritten the tests without changing the behaviour of the kata's code, something like this:

    using NUnit.Framework;
    using System;
    
    [TestFixture]
    public class IsStringUppercaseUnitTests
    {
        [TestCase("A", true)]
        [TestCase("ALLUPPER", true)]
        [TestCase("ALLUPPER WITHSPACE", true)]
        [TestCase("a", false)]
        [TestCase("alllower", false)]
        [TestCase("alllower withspace", false)]
        [TestCase("PascalCase", false)]
        [TestCase("mIxEd BaG", false)]
        public void IsUpperCase_WhenCalled_ReturnsTrueIfParameterIsAllUppercase(string input, bool output)
        {
            // Arrange
            var s = input;
    
            // Act
            var result = s.IsUpperCase();
    
            // Assert
            Assert.That(result, Is.EqualTo(output));
        }
    }
    
  • Custom User Avatar

    Can you say which languages use state and have this keyword?

  • Custom User Avatar

    Your code won't work, have you seen the initial code?

    public static class StringExtensions
    {
      public static bool IsUpperCase(this string text)
      {
        // your code here
      }
    }
    

    In the tests, your code is used like this: "some string".IsUpperCase(), not like this: IsUpperCase("some string")

  • Custom User Avatar

    This will invalidate all solutions as kata description is shared among languages