Re: [Stripes-users] Unit Test with stripes FileBean

2013-09-03 Thread -
Thanks Finally I made similar code MockServletContext ctx = getServletContext(); MockRoundtrip trip = new MockRoundtrip(ctx, FormAction.class); File file = new File("img.jpg"); FileBean fileBean = new FileBean(file, "image/jpeg", file.getName());

Re: [Stripes-users] Unit Test with stripes FileBean

2013-09-03 Thread Brandon Goodin
I recently dealt with this. You can manually retrieve the action and set the FileBean value on the action class within your unit test. If you are planning to use and test annotation based validation then you will be out of luck. You can't do it. I had a required file in my app. I wound up using man

[Stripes-users] Unit Test with stripes FileBean

2013-09-03 Thread -
Hi, Can someone help me how to use Unit Test with stripes FileBean submit ? I have: //FormAction.class public FileBean file; public FileBean getFile() { return file; } public void setFile(FileBean file) { this.file = file; } //Test.class MockServletContext ctx = getServletContext(); // cont