Interface
IUIProject

Interface implemented by the host project system.

Definition

Namespace:ArtOfTest.WebAii.Design.ProjectModel

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
public interface IUIProject

Derived Classes: StandaloneHost

Properties

CodeService

The code service for compilation/parsing

Declaration

cs-api-definition
ICodeService CodeService { get; }

Property Value

ICodeService

ElementsExplorer

Declaration

cs-api-definition
IElementsExplorer ElementsExplorer { get; set; }

Property Value

IElementsExplorer

InteractionService

Declaration

cs-api-definition
IUserInteractionService InteractionService { get; }

Property Value

IUserInteractionService

ScopedContainer

Declaration

cs-api-definition
ILifetimeScope ScopedContainer { get; }

Property Value

ILifetimeScope

SelectedProject

Gets the currently selected project, or null if no project is selected

Declaration

cs-api-definition
Project SelectedProject { get; }

Property Value

Project

UIInteraction

Declaration

cs-api-definition
IHostInteraction UIInteraction { get; }

Property Value

IHostInteraction

Methods

AddCodedFunction(Test, AutomationStep, string, bool)

Add a coded function to the test.

Declaration

cs-api-definition
void AddCodedFunction(Test test, AutomationStep step, string functionContent, bool positionCodedStep)

Parameters

test

Test

The test

step

AutomationStep

The test to add the function for

functionContent

string

The code to add

positionCodedStep

bool

AddFile(string)

Adds a file to the project. The file should already exist on disk under the project root.

Declaration

cs-api-definition
void AddFile(string location)

Parameters

location

string

The full path to the file

AddProjectReference(Project, string)

Add a project reference to a certain assembly

Declaration

cs-api-definition
void AddProjectReference(Project project, string assemblyFullName)

Parameters

project

Project

The project to add reference to.

assemblyFullName

string

The full assembly name

AssignCodeService(ICodeService)

Assign the code service provider

Declaration

cs-api-definition
void AssignCodeService(ICodeService codeService)

Parameters

codeService

ICodeService

AssignHostInteraction(IHostInteraction)

Assign the interaction interface to this project

Declaration

cs-api-definition
void AssignHostInteraction(IHostInteraction hostInteraction)

Parameters

hostInteraction

IHostInteraction

BuildProject(Project, bool)

Compile the project

Declaration

cs-api-definition
CompilerResults BuildProject(Project project, bool skipInDevelopment)

Parameters

project

Project

skipInDevelopment

bool

Returns

CompilerResults

CreateTest(string, Test)

Declaration

cs-api-definition
Test CreateTest(string path, Test sourceTest)

Parameters

path

string

sourceTest

Test

Returns

Test

DisplayLanguageSelector(Project)

Display a dialog where the user selects the language of a project

Declaration

cs-api-definition
bool DisplayLanguageSelector(Project project)

Parameters

project

Project

Returns

bool

GetCodedFunctions(Test, out string)

Declaration

cs-api-definition
List<string> GetCodedFunctions(Test test, out string parsingError)

Parameters

test

Test

parsingError

string

Returns

List<string>

GetOutputFileName(string)

Gets the output file name for a certain project. TODO:// Why do we need to pass in a testpath? Why not a project object?

Declaration

cs-api-definition
string GetOutputFileName(string testPath)

Parameters

testPath

string

Returns

string

GetOutputFolder(string)

Gets the output directory given a test. TODO:// Why do we need to pass in a testpath? Why not a project object?

Declaration

cs-api-definition
string GetOutputFolder(string testPath)

Parameters

testPath

string

Returns

string

GetProjectScope(string)

Declaration

cs-api-definition
ILifetimeScope GetProjectScope(string projectPath)

Parameters

projectPath

string

Returns

ILifetimeScope

GetSpecialFolder(Project, SpecialFolders)

Get the location of a specific special folder as defined by the enum

Declaration

cs-api-definition
string GetSpecialFolder(Project project, SpecialFolders folder)

Parameters

project

Project

folder

SpecialFolders

The special folder to get.

Returns

string

The full path to the folder.

GetTestNames(Project)

Gets a list of WebAii test names in the project.

Declaration

cs-api-definition
List<string> GetTestNames(Project proj)

Parameters

proj

Project

Returns

List<string>

A list of full paths for .aii files in the project.

LogMessage(string, bool)

Log a message to the log.

Declaration

cs-api-definition
void LogMessage(string message, bool includeTimestamp)

Parameters

message

string

The message to log

includeTimestamp

bool

Whether to include a timestamp or not

OnProjectDirtied(string)

Notify the orchestrator that the project has changed

Declaration

cs-api-definition
void OnProjectDirtied(string projectPath)

Parameters

projectPath

string

PrepareToExecuteTest(Test, bool)

Prompts the user to save a list of dirty files and saves the ones they want to save

Declaration

cs-api-definition
bool PrepareToExecuteTest(Test test, bool doDisplayErrors = true)

Parameters

test

Test

doDisplayErrors

bool

Display errors unless this is a Web Test to capture Load data from

Returns

bool

True if the user clicks OK, false if the user clicks Cancel

PrepareToExecuteTestAsync(Test, bool)

Declaration

cs-api-definition
Task<bool> PrepareToExecuteTestAsync(Test test, bool doDisplayErrors = true)

Parameters

test

Test

doDisplayErrors

bool

Returns

Task<bool>

PromptAndSaveFiles(object)

Prompt the user if they would like to save a list of files

Declaration

cs-api-definition
bool PromptAndSaveFiles(object files)

Parameters

files

object

Returns

bool

False if Cancel is clicked, True otherwise

RemoveProjectReference(Project, string)

Remove a project reference to a certain assembly

Declaration

cs-api-definition
void RemoveProjectReference(Project project, string assemblyFullName)

Parameters

project

Project

The project to remove reference from.

assemblyFullName

string

The full assembly name

SetHostStatus(string)

Set the host status (if it has one)

Declaration

cs-api-definition
void SetHostStatus(string text)

Parameters

text

string

The status text

SetHostStatus(string, bool)

Declaration

cs-api-definition
void SetHostStatus(string text, bool showProgressBar)

Parameters

text

string

showProgressBar

bool

ShowTestCodeFile(Test, IStepViewModel)

Show the code file for the passed in test

Declaration

cs-api-definition
void ShowTestCodeFile(Test test, IStepViewModel step)

Parameters

test

Test

The test to show the code file for.

step

IStepViewModel

If not null, the navigate to that coded step

UpdateCodedStepContent(AutomationStep)

Declaration

cs-api-definition
void UpdateCodedStepContent(AutomationStep automationStep)

Parameters

automationStep

AutomationStep

Events

ProjectClosed

Project closed

Declaration

cs-api-definition
event EventHandler<ProjectClosedEventArg> ProjectClosed

Event Value

EventHandler<ProjectClosedEventArg>

ProjectClosing

Project closed

Declaration

cs-api-definition
event EventHandler<ProjectClosedEventArg> ProjectClosing

Event Value

EventHandler<ProjectClosedEventArg>

ProjectCreated

Project created

Declaration

cs-api-definition
event EventHandler<ProjectEventArgs> ProjectCreated

Event Value

EventHandler<ProjectEventArgs>

ProjectOpened

Project openned

Declaration

cs-api-definition
event EventHandler<ProjectEventArgs> ProjectOpened

Event Value

EventHandler<ProjectEventArgs>

ProjectRenamed

Project Renamed

Declaration

cs-api-definition
event EventHandler<RenameEventArg> ProjectRenamed

Event Value

EventHandler<RenameEventArg>

ProjectSaved

Project is saved

Declaration

cs-api-definition
event EventHandler<ProjectEventArgs> ProjectSaved

Event Value

EventHandler<ProjectEventArgs>

ProjectSelected

Project is selected in a (for multi-project systems)

Declaration

cs-api-definition
event EventHandler<ProjectEventArgs> ProjectSelected

Event Value

EventHandler<ProjectEventArgs>

TestClosed

The test has been closed

Declaration

cs-api-definition
event EventHandler<TestEventArg> TestClosed

Event Value

EventHandler<TestEventArg>

TestSaved

The test was saved

Declaration

cs-api-definition
event EventHandler<TestEventArg> TestSaved

Event Value

EventHandler<TestEventArg>

TestSelected

A Test is selected

Declaration

cs-api-definition
event EventHandler<TestEventArg> TestSelected

Event Value

EventHandler<TestEventArg>