This project is read-only.
3
Vote

DeleteStep fails when read in from a XAML TestCase

description

When executing a TestCase that is read in from a XAML file, the DeleteStep will always fail as the FilePathToDelete collection is not properly instantiated.
 
Creating a default constructor like the below allows the DeleteStep to be properly instantiated by the XAML deserializer.
 
    /// <summary>
    /// Default constructor which ensures that FilePathsToDelete is instantiated and thus the DeleteStep can deserialize properly.
    /// </summary>
    public DeleteStep()
    {
        FilePathsToDelete = new Collection<string>();
    }
 
Note that this might be a problem with other test steps that make use of collections.

comments

rdeveen wrote Jul 25, 2014 at 2:33 PM

Can someone please fix this issues?


<TestCase.CleanupSteps>
<btf:DeleteStep SubSteps="{x:Null}" FailOnError="False" RunConcurrently="False">
  <btf:DeleteStep.FilePathsToDelete>
    <x:String>C:\file.csv</x:String>
    <x:String>C:\file2.csv</x:String>
  </btf:DeleteStep.FilePathsToDelete>
</btf:DeleteStep>
</TestCase.CleanupSteps>