1
Vote

FilePathsToDelete Error

description

Below my code:
 
var delete = new DeleteStep();
delete.FilePathsToDelete.Add("C:\Test\Out\*.xml");
delete.Execute(new Context());
 
I am getting "Object reference not set to an instance of an object." error in line 2. What am I doing wrong?
 
Thank you.

file attachments

comments

TychoLien wrote Aug 19, 2011 at 10:14 AM

Change your code to:

var delete = new DeleteStep();
var filePathsToDelete = new Collection<string> {"C:\Test\Out\*.xml"};

delete.FilePathsToDelete = filePathsToDelete;
delete.Execute(new Context());

That'll work

wrote May 11, 2012 at 9:29 AM

KurtEwald wrote May 11, 2012 at 9:29 AM

Hello,

I have experienced the same problem. I am about to create a .exe command
line tool, which is able to execute Xaml BizUnit 4.0 tests.

1) I have already considered the comments given above, but I still experience this
problem. I don' have any glue. Any help will be highly appreciated.

2) Is there already a ready made command line tool provided by BizUnit, which is able to execute a Xaml testcase from the cmd command line?

Ad 1) I have attached the Xaml sample testcase, which I am trying to execute.

Thanks in advance!

Best regards

Kurt

jcooper1982 wrote Jun 6, 2012 at 9:20 PM

Also see the fix suggested in issue #18194 - changing the default constructor to ensure that the collection is instantiated when the test step is instantiated.

wrote Feb 14, 2013 at 7:43 PM