approval tests - File getting deleted when using ApprovalTests -


consider following code:

[test, usereporter(typeof(winmergereporter))] public void test() {        var filetoverify = "test.csv";     approvals.verifyfile(filetoverify); } 

whenever run this, file "test.csv" gets deleted. in approvaltests source code, i've seen received files getting deleted under impression applied .received. files created.

incidentally, don't see .received. file created in instance. first question going under hood code isn't quite making sense. next question how prevent "test.csv" getting deleted.

you right received file deleted on successful verification. in case of verifyfile specifying received file there no special naming, file pass considered received file.

this desired behavior want generate file each time run test, otherwise point of test?

however, if want file hang around because doing things after test (not great idea, don't know full story) suggest making temporary copy verify.

file.copy(from,to); 

happy testing!
llewellyn


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -