diff --git a/CHANGELOG.md b/CHANGELOG.md index c0ecfa4..bdd1a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ see also [Releases on GitHub](https://github.com/mazzy-ax/SysArgs/releases) -## [0.2.0](https://github.com/mazzy-ax/SysArgs/compare/0.1.0...0.2.0) - 2019-01-16 +## [0.2.0](https://github.com/mazzy-ax/SysArgs/compare/v0.1.0...v0.2.0) - 2019-01-16 ### Добавлено diff --git a/ax2009/Class_SysTestListenerDB_190116.xpo b/ax2009/Class_SysTestListenerDB_190116.xpo deleted file mode 100644 index 8f85d97..0000000 --- a/ax2009/Class_SysTestListenerDB_190116.xpo +++ /dev/null @@ -1,334 +0,0 @@ -Exportfile for AOT version 1.0 or later -Formatversion: 1 - -***Element: CLS - -; Microsoft Dynamics AX Class: SysTestListenerDB выгружен -; -------------------------------------------------------------------------------- - CLSVERSION 1 - - CLASS #SysTestListenerDB - Id 4251 - PROPERTIES - Name #SysTestListenerDB - Extends # - RunOn #Called from - ENDPROPERTIES - - METHODS - Version: 3 - SOURCE #infoComplete - #void infoComplete() - #{ - # SysTestJobTable sysTestJobTable = SysTestJobTable::find(this.parmJobId()); - #; - # infolog.add( sysTestJobTable.Status == SysTestStatus::Passed ? Exception::Info : Exception::Warning, - # strfmt("%3: Тест завершен. %1:%2", sysTestJobTable.TestJobId, sysTestJobTable.Name, sysTestJobTable.Status), - # '', SysInfoAction_TableField::newBuffer(sysTestJobTable) ); - #} - ENDSOURCE - SOURCE #addFailure - #public void addFailure(SysTestListenerData _data) - #{ - # Object test = _data.parmTest(); - # ; - # this.write(test, SysTestListenerLevel::Failure, _data.parmMessage()); - #} - ENDSOURCE - SOURCE #addInformation - #/// Adds an information message for the given test - #/// (test information as well as message are included in SysTestListenerData value object). - #public void addInformation(SysTestListenerData _data) - #{ - # Object test = _data.parmTest(); - # ; - # this.write(test, SysTestListenerLevel::Info, _data.parmMessage()); - #} - ENDSOURCE - SOURCE #classDeclaration - #/// Listener writing messages into Axapta database tables. - #// This is a framework class. Customizing this class may cause problems with future upgrades to the software. - #class SysTestListenerDB implements SysTestListener - #{ - # SysTestJobId jobId; - # SysTestNodeId nodeId; - # LineNum lineNum; - # UserConnection connection; - #} - ENDSOURCE - SOURCE #close - #/// Method cleans all resources allocated in open. - #public void close() - #{ - #; - # connection = null; - #} - ENDSOURCE - SOURCE #createJobTable - #protected SysTestJobId createJobTable(TreeNodePath name) - #{ - # #ODBCConnectionEntries - # #AOT - # - # SysTestJobTable sysTestJobTable; - # SysDBInformation DBInformation = SysDBInformation::construct(); - # SysOSInformation sysOSInformationClient = SysOSInformation::construct_Client(); - # SysOSInformation sysOSInformationServer = SysOSInformation::construct_Server(); - #; - # - # sysTestJobTable.setConnection(connection); - # connection.ttsbegin(); - # - # sysTestJobTable.TestJobId = SysTestJobTable::nextId(); - # sysTestJobTable.Name = name; - # sysTestJobTable.ApplBuildNo = ApplicationVersion::applBuildNo(); - # sysTestJobTable.AOSClientMode = Session::AOSClientMode(); - # sysTestJobTable.DatabaseType = DBInformation.infoStr(#SQL_DBMS_NAME); - # sysTestJobTable.DatabaseVersion = DBInformation.infoStr(#SQL_DBMS_VER); - # sysTestJobTable.ClientOperatingSystem = sysOSInformationClient.OSName(); - # sysTestJobTable.ClientOperatingSystemSuite = sysOSInformationClient.OSSuite(); - # sysTestJobTable.ClientOperatingSystemSP = sysOSInformationClient.OSSP(); - # sysTestJobTable.ClientSystemLocale = sysOSInformationClient.systemLocale(); - # sysTestJobTable.ServerOperatingSystem = sysOSInformationServer.OSName(); - # sysTestJobTable.ServerOperatingSystemSuite = sysOSInformationServer.OSSuite(); - # sysTestJobTable.ServerOperatingSystemSP = sysOSInformationServer.OSSP(); - # sysTestJobTable.ServerSystemLocale = sysOSInformationServer.systemLocale(); - # sysTestJobTable.StartTime = timenow(); - # sysTestJobTable.StartDate = today(); - # sysTestJobTable.Status = SysTestStatus::Running; - # - # sysTestJobTable.insert(); - # - # connection.ttscommit(); - # return sysTestJobTable.TestJobId; - #} - ENDSOURCE - SOURCE #endSuite - #public void endSuite(SysTestListenerData _data) - #{ - # SysTestCodeCoverage coverage = _data.parmCoverage(); - # SysTestJobTable jobTable; - # SysTestTable testTable; - # container numbers; - # ; - # - # testTable.setConnection(connection); - # jobTable.setConnection(connection); - # connection.ttsbegin(); - # - # select firstonly forupdate testTable - # where testTable.TestJobId == jobId - # && testTable.TestNodeId == nodeId; - # - # nodeId = testTable.ParentTestNodeId; - # - # if (coverage) - # { - # numbers = coverage.getCoverageNumbers(); - # testTable.ActualLineCount = conpeek(numbers, 1); - # testTable.CoveredLineCount = conpeek(numbers, 2); - # testTable.CoveragePercent = conpeek(numbers, 3); - # testTable.CoverageData = coverage.getCoverageData(); - # } - # testTable.TimeInMS = _data.parmTime(); - # testTable.Status = _data.parmResult(); - # testTable.update(); - # - # // - # // Is it the root testTable? - # // - # if (nodeId == 0) - # { - # select firstonly forupdate jobTable - # where jobTable.TestJobId == jobId; - # - # if (numbers) - # { - # jobTable.ActualLineCount = conpeek(numbers, 1); - # jobTable.CoveredLineCount = conpeek(numbers, 2); - # jobTable.CoveragePercent = conpeek(numbers, 3); - # } - # jobTable.EndTime = timenow(); - # jobTable.TimeInMS = _data.parmTime(); - # jobTable.Status = _data.parmResult(); - # jobTable.update(); - # } - # - # connection.ttscommit(); - #} - ENDSOURCE - SOURCE #endTest - #public void endTest(SysTestListenerData _data) - #{ - # SysTestLine sysTestLine; - # container numbers; - # SysTestCodeCoverage coverage = _data.parmCoverage(); - # ; - # if (coverage) - # { - # numbers = coverage.getCoverageNumbers(); - # } - # - # sysTestLine.setConnection(connection); - # connection.ttsbegin(); - # - # select forupdate sysTestLine - # where sysTestLine.TestJobId == jobId - # && sysTestLine.TestNodeId == nodeId - # && sysTestLine.LineNum == lineNum; - # - # if (coverage != null) - # { - # sysTestLine.CoverageData = coverage.getCoverageData(); - # sysTestLine.ActualLineCount = conpeek(numbers, 1); - # sysTestLine.CoveredLineCount = conpeek(numbers, 2); - # sysTestLine.CoveragePercent = conpeek(numbers, 3); - # } - # sysTestLine.InfoLogData = _data.parmInfologData(); - # sysTestLine.TimeInMS = _data.parmTime(); - # sysTestLine.Status = _data.parmResult(); - # sysTestLine.update(); - # - # connection.ttscommit(); - #} - ENDSOURCE - SOURCE #new - #/// Constructs a valid instance of the class. - #public void new() - #{ - #; - # lineNum = 0; - #} - ENDSOURCE - SOURCE #open - #/// Method creates all necessary resources (should be cleaned in close). - #public void open() - #{ - #; - # connection = new UserConnection(); - #} - ENDSOURCE - SOURCE #parmJobId - #public SysTestJobId parmJobId() - #{ - # return jobId; - #} - # - ENDSOURCE - SOURCE #startSuite - #/// Signals that the given suite is about to be started - #/// (test information is included in SysTestListenerData value object). - #public void startSuite(SysTestListenerData _data) - #{ - # #AOT - # SysTestTable testTable; - #; - # - # if (!jobId) - # { - # jobId = this.createJobTable(_data.parmTest().getName()); - # } - # - # testTable.setConnection(connection); - # connection.ttsbegin(); - # - # testTable.TestJobId = jobId; - # testTable.ParentTestNodeId = nodeId; - # nodeId = SysTestTable::nextTestNodeId(jobId); - # testTable.TestNodeId = nodeId; - # testTable.Description = _data.parmTest().getName(); - # testTable.Status = SysTestStatus::NotStarted; - # testTable.StartDate = today(); - # testTable.StartTime = timenow(); - # - # testTable.insert(); - # - # connection.ttscommit(); - #} - ENDSOURCE - SOURCE #startTest - #/// Signals that the given test is about to be started - #/// (test information is included in SysTestListenerData value object). - #public void startTest(SysTestListenerData _data) - #{ - # SysTestLine sysTestLine; - # SysTestTable sysTestTable; - # SysTestExecutable executable = _data.parmTest(); - # SysTest test = SysDictClass::as(executable, classnum(SysTest)); - # ; - # lineNum++; - # - # sysTestTable.setConnection(connection); - # sysTestLine.setConnection(connection); - # - # connection.ttsbegin(); - # - # if (test) - # { - # select firstonly forupdate sysTestTable - # where sysTestTable.TestJobId == jobId && - # sysTestTable.TestNodeId == nodeId && - # sysTestTable.TestsElementName == ''; - # - # if (sysTestTable) - # { - # sysTestTable.StartDate = today(); - # sysTestTable.StartTime = timenow(); - # sysTestTable.TestsElementName = test.parmTestable().testsElementName(); - # sysTestTable.TestsElementType = test.parmTestable().testsElementType(); - # sysTestTable.update(); - # } - # } - # - # sysTestLine.TestJobId = jobId; - # sysTestLine.TestNodeId = nodeId; - # sysTestLine.LineNum = lineNum; - # sysTestLine.Status = SysTestStatus::Running; - # sysTestLine.TestMethodName = _data.parmTest().getName(); - # sysTestLine.insert(); - # - # connection.ttscommit(); - #} - ENDSOURCE - SOURCE #write - #/// Writes messages into Axapta database tables. - #protected void write(SysTestExecutable _test, SysTestListenerLevel _level, str _message) - #{ - # SysTestLineLog sysTestLineLog; - # SysInfoAction_Editor action = SysInfoAction_Editor::newStackClass(classstr(SysTestAssert)); - # - # // Having a local user connection object here rather than using member varibale one - # // because - this method is used frequently from all tests and UserConnection class - # // has valuable cleanup code in the destructor. So using local to make this go out of scope. - # UserConnection conn = new UserConnection(); - # ; - # - # // Using user connection. - # sysTestLineLog.setConnection(conn); - # conn.ttsbegin(); - # - # sysTestLineLog.TestJobId = jobId; - # sysTestLineLog.TestNodeId = nodeId; - # sysTestLineLog.TestLineNum = lineNum; - # sysTestLineLog.Level = _level; - # sysTestLineLog.Message = _message; - # sysTestLineLog.TestMethodName = _test.getName(); - # sysTestLineLog.LineNum = SysTestLineLog::nextLineNum(sysTestLineLog.TestJobId, - # sysTestLineLog.TestNodeId, - # sysTestLineLog.TestMethodName); - # if (action) - # { - # sysTestLineLog.ActionData = action.pack(); - # } - # - # sysTestLineLog.insert(); - # - # conn.ttscommit(); - # conn = null; - #} - # - ENDSOURCE - ENDMETHODS - ENDCLASS - -***Element: END