public void CheckPIDataLinkTest() { if (Settings.PIDataLinkTests) { Output.WriteLine("Check if PI DataLink is installed locally."); Assert.True(DataLinkUtils.DataLinkIsInstalled(), "PI DataLink is not installed locally."); } else { Output.WriteLine($"'PIDataLinkTests' setting value is set to 'false' or not set at all. Check if PI DataLink is installed locally was skipped."); } }
/// <summary> /// Constructor for the DataLinkFactAttribute class. /// </summary> public DataLinkFactAttribute() : base(DataLinkAFTests.KeySetting, DataLinkAFTests.KeySettingTypeCode) { // Return if the Skip property has been changed in the base constructor if (!string.IsNullOrEmpty(Skip)) { return; } try { // Skip DataLink tests if we can't create an AFLibrary instance if (!DataLinkUtils.DataLinkIsInstalled()) { Skip = "Test skipped because DataLink was not installed."; } } catch (Exception ex) { Skip = $"Test skipped because DataLink could not be loaded due to the error [{ex.Message}]."; } }