Пример #1
0
        public void ApexTypesAreSupported()
        {
            var apexVoid = new TypeSyntax(ApexKeywords.Void);

            Assert.AreEqual("void", apexVoid.ToApex());

            var apexContact = new TypeSyntax("MyApp", "Dto", "Contact");

            Assert.AreEqual("MyApp.Dto.Contact", apexContact.ToApex());

            var apexList = new TypeSyntax("List")
            {
                TypeParameters = new List <TypeSyntax>
                {
                    new TypeSyntax("Custom", "Class"),
                },
            };

            Assert.AreEqual("List<Custom.Class>", apexList.ToApex());

            var apexArray = new TypeSyntax("String")
            {
                IsArray = true
            };

            Assert.AreEqual("String[]", apexArray.ToApex());
        }