コード例 #1
0
        public void RunRules_GetError_from_Rule_Success_Test()
        {
            string file = @"C:\Users\ACER\Desktop\luanvan\started\TestBuildArchitecture\DataTest\RunRules_GetError_from_Rule_Success_Test.cs";

            workSpace.InitOrUpdateParserTreeOfFile(file, GetFileContent(file));
            workSpace.RunRules(file);

            var error = workSpace.GetErrors();

            Assert.AreEqual(1, error[file].Count);
            Assert.AreEqual("Error", error[file][0].ErrorMessage);
        }
コード例 #2
0
 public List <ErrorInformation> GetErrorInformation(string buffer)
 {
     _workSpace.InitOrUpdateParserTreeOfFile(this._filePath, buffer);
     _workSpace.RunRules(this._filePath);
     return(_workSpace.GetErrors(this._filePath));
 }