// Copyright Keysight Technologies 2012-2019
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at http://mozilla.org/MPL/2.0/.
namespace OpenTap
{
///
/// Custom handler for importing TestPlan data.
/// Which implementation of ITestPlanImport is used is based on the file type (ITestPlanExport.Extension).
///
///
/// The developer determines the content and complexity of classes that implement this type.
/// It might be as simple as unzipping a TestPlan, or as complex as reading a well-defined Excel file that represents some TestPlan data.
///
[Display("Test Plan Import")]
public interface ITestPlanImport : ITapPlugin
{
///
/// The extension of the imported file including the '.'. For example '.zip'.
///
string Extension { get; }
///
/// Name of the file format. Shown when the user selects the format in the UI.
/// For example, Compressed Using Zip.
///
string Name { get; }
///
/// Imports a file. The contents of the file can be an entire TestPlan, or data to be inserted into a dynamically created TestPlan.
///
/// The absolute or relative path to file.
/// The test plan constructed as part of the Import.
TestPlan ImportTestPlan(string filePath);
}
///
/// Custom handler for exporting TestPlan data.
/// Which implementation of ITestPlanExport is used is based on the file type (ITestPlanExport.Extension).
///
///
/// The developer determines the content and complexity of classes that implement this type/>.
/// It might be as simple as unzipping a TestPlan, or as complex as reading a well-defined Excel file that represents some TestPlan data.
///
[Display("Test Plan Export")]
public interface ITestPlanExport : ITapPlugin
{
///
/// The extension of the exported file including the '.'. For example '.zip'.
///
string Extension { get; }
///
/// Name of the file format. Shown when the user selects the format in the GUI.
/// For example, Compressed Using Zip.
///
string Name { get; }
///
/// Exports the test plan or TestPlan data to a file.
///
/// The plan.
/// The absolute or relative path to the file.
void ExportTestPlan(TestPlan plan, string filePath);
}
///
/// Custom GUI handler for importing TestPlan data.
///
///
/// In contrast to implementations of this provides their own custom GUI to allows user to select the TestPlan file/data.
/// For example, using a GUI to load the plan from a database or virtual location such as Dropbox or AWS S3.
///
[Display("Test Plan Import Custom Dialog")]
public interface ITestPlanImportCustomDialog : ITapPlugin
{
///
/// Import TestPlan.
///
/// The test plan contructed as part of the import
TestPlan ImportTestPlan();
}
///
/// Custom GUI handler for importing TestPlan data.
///
///
/// In contrast to implementations of this provides their own custom GUI to allows user to select the export destination.
/// For example, using a GUI to save the plan into a database or virtual location such as Dropbox or AWS S3.
///
[Display("Test Plan Export Custom Dialog")]
public interface ITestPlanExportCustomDialog : ITapPlugin
{
///
/// Exports the test plan or TestPlan data.
///
/// The plan
void ExportTestPlan(TestPlan plan);
}
}