Example #1
0
        public static void ViewToClassName_GivenSpaceSeparatedLocalName_ReturnsSpaceRemovedText()
        {
            var          nameTranslator = new PascalCaseNameTranslator();
            var          testName       = new Identifier("first second");
            const string expected       = "Firstsecond";

            var result = nameTranslator.ViewToClassName(testName);

            Assert.That(result, Is.EqualTo(expected));
        }
Example #2
0
        public static void ViewToClassName_GivenCamelCasedSchemaName_ReturnsPascalCasedText()
        {
            var          nameTranslator = new PascalCaseNameTranslator();
            var          testName       = new Identifier("FirstSecond");
            const string expected       = "FirstSecond";

            var result = nameTranslator.ViewToClassName(testName);

            Assert.That(result, Is.EqualTo(expected));
        }
Example #3
0
        public static void ViewToClassName_GivenNullName_ThrowsArgumentNullException()
        {
            var nameTranslator = new PascalCaseNameTranslator();

            Assert.That(() => nameTranslator.ViewToClassName(null), Throws.ArgumentNullException);
        }