Ejemplo n.º 1
0
        public void Description_Doesnt_Contain_Uncommented_NewLine_For_PHP()
        {
            testProperty.Description = actualInputString;
            string sanitizedString = TypeHelperPHP.GetSanitizedLongDescription(testProperty);

            Assert.AreEqual(expectedOutputString, sanitizedString, "GetSanitizedLongDescription is not handling escaped CRLF.");
        }
Ejemplo n.º 2
0
        public void PHPMainNamespace_Generated_For_V1()
        {
            var          testNamespace        = "microsoft.graph";
            const string expectedPHPNamespace = "Microsoft\\Graph";

            var actualPHPNamespace = TypeHelperPHP.GetPHPNamespace(testNamespace);

            Assert.AreEqual(expectedPHPNamespace, actualPHPNamespace);
        }
Ejemplo n.º 3
0
        public void PHPSubNamespace_Generated_For_Beta()
        {
            var          testNamespace        = "microsoft.graph.callRecords";
            const string expectedPHPNamespace = "Beta\\Microsoft\\Graph\\CallRecords";

            var actualPHPNamespace = TypeHelperPHP.GetPHPNamespace(testNamespace, "Beta");

            Assert.AreEqual(expectedPHPNamespace, actualPHPNamespace);
        }
        public override String WritePath(ITemplateInfo template, String entityTypeName)
        {
            var theNamespace  = this.CreateNamespace(template.TemplateType.ToString().ToUpperFirstChar());
            var namespacePath = this.CreatePathFromNamespace(theNamespace);

            var fileName = Extensions.StringExtensions.ToCheckedCase(this.TransformFileName(template, TypeHelperPHP.SanitizeEntityName(entityTypeName)));

            String filePath = Path.Combine(namespacePath, fileName);

            return(filePath);
        }