Ejemplo n.º 1
0
        public static void SchemaToNamespace_GivenNullSchema_ReturnsNull()
        {
            var nameTranslator = new PascalCaseNameTranslator();
            var testName       = new Identifier("test");

            var result = nameTranslator.SchemaToNamespace(testName);

            Assert.That(result, Is.Null);
        }
Ejemplo n.º 2
0
        public static void SchemaToNamespace_GivenCamelCasedSchemaName_ReturnsPascalCasedText()
        {
            var          nameTranslator = new PascalCaseNameTranslator();
            var          testName       = new Identifier("FirstSecond", "test");
            const string expected       = "FirstSecond";

            var result = nameTranslator.SchemaToNamespace(testName);

            Assert.That(result, Is.EqualTo(expected));
        }
Ejemplo n.º 3
0
        public static void SchemaToNamespace_GivenNullName_ThrowsArgumentNullException()
        {
            var nameTranslator = new PascalCaseNameTranslator();

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