Exemple #1
0
        public bool runTest(ref String errorMessage)
        {
            int            testValue = 0;
            NSFXMLDocument document  = new NSFXMLDocument();

            if (!document.loadFile(FileName))
            {
                errorMessage = "Error loading file";
                return(false);
            }

            document.getChildElementValue <int>("VE_1_1", ref testValue);
            if (testValue != 5)
            {
                errorMessage = "Error reading value VE_1_1";
                return(false);
            }

            if (!document.jumpToChildElement("CE_1_1"))
            {
                errorMessage = "Error moving to child element CE_1_1";
                return(false);
            }

            if (!document.jumpToChildElement("CE_1_1_1"))
            {
                errorMessage = "Error moving to child element CE_1_1_1";
                return(false);
            }

            document.getChildElementValue <int>("VE_1_1_1_1", ref testValue);
            if (testValue != 1)
            {
                errorMessage = "Error reading value VE_1_1_1_1";
                return(false);
            }

            if (!document.jumpToParentElement())
            {
                errorMessage = "Error moving back up to parent element CE_1_1_1";
                return(false);
            }

            if (!document.jumpToParentElement())
            {
                errorMessage = "Error moving back up to parent element CE_1_1";
                return(false);
            }

            document.getChildElementValue <int>("VE_1_1", ref testValue);
            if (testValue != 5)
            {
                errorMessage = "Error reading value VE_1_1 second time";
                return(false);
            }

            return(true);
        }
        public bool runTest(ref String errorMessage)
        {
            NSFXMLDocument document = new NSFXMLDocument();

            // As long as there is no exception it is ok
            document.loadFile(FileName);

            return true;
        }
        public bool runTest(ref String errorMessage)
        {
            NSFXMLDocument document = new NSFXMLDocument();

            // As long as there is no exception it is ok
            document.loadFile(FileName);

            return(true);
        }