classdef SetCollectionRunNameAction < fxptui.internal.action.Action
    %SetCollectionRunNameAction Action of making sure both baseline and verification
    %run names are unique
    
    %   Copyright 2019 The MathWorks, Inc.
    
    methods(Access = {?fxptui.internal.action.Action, ?WorkflowTestCase})
        
        function executeLocal(~, converter, workflowSetting)
            
            % make the run name on the baseline collection settings unique
            collectionSettings = workflowSetting.getSettingValue('CollectionSetting');
            originalBaselineRunName = collectionSettings.BaselineRunName;
            uniqueBaselineRunName = converter.makeRunNameUnique(originalBaselineRunName);
            collectionSettings.RunName = uniqueBaselineRunName;
            
        end
        
    end
end
