-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Viewbagdatasupport #4
base: master
Are you sure you want to change the base?
Conversation
…WithViewData + added unit tests.
Hi @segilbert! Thanks for the PR :) Have you been using this library for long? How have you been finding it? I think it's a good addition to have view bag and view data checking. I have a few questions below that come to mind after reviewing the code. I'm happy to devise / code up some solutions to these questions if you don't have any more time, but given you've already done some of the work I figure I'll put my thoughts here so we can work on it together if you like?
Some of those questions might be a bit hard to understand without a code sample so let me know if you want me to clarify any of them. Thanks again! |
Oh and a couple of other things:
|
Rob, Thanks for the consideration and thoughtful analysis. I tossed this together quickly to help me setup a more fluent and expressive xUnit Test Framework template for VS with the intention of expanding. Basically creating an xUnit Test Framework Template for ASP.NET MVC projects in VS; includes xUnit, NSubstitute, TestStack.FluentMvcTesting and MVCRouteTester. As soon as I started using TestStack.FluentMvcTesting I loved it. I'm also looking at MvcContrib and MVCRouteTester to test routes ... leaning towards MVCRouteTester at the moment. Have you used either for testing routes? I'm open to helping, let me try to address your list of questions.
|
Tonight was spent figuring out how to get tsqlt tests running in TeamCity :P I'll get back to you tomorrow evening! FYI I'm GMT+8 :) Is this the route library you mean? http://mvcrouteunittester.codeplex.com/ I've never used that before, but the syntax doesn't look anywhere near as nice as MvcContrib? I personally use a modified version of MvcContrib that uses NSubstitute instead of Rhino.Mocks and also checks that the route data returned from the route check, when passed into Url.Action will generate the same route that you are testing against. I've been meaning to open source it, but I haven't found the time. If you are interested in seeing it let me know. |
|
If you are happy to run with some of this feel free. It will probably take me a couple of weeks to get to this because I'm tied up in a couple of other projects at the moment. Also, I've been chatting with some other TestStackers and we were thinking that it might actually make sense to include route testing in this library. I would take the code I have that uses NSubstitute and put it in there and possibly tweak the fluent syntax to make it better. What do you think? |
I'd be happy to run with this, see what I can tackle this week. Will touch base early next week. |
Awesome! Looking forward to it mate |
any updates on that available? |
I've been treading water lately. If you are still interesting in adding On Fri, May 2, 2014 at 11:31 AM, Bernhard Millauer <[email protected]
Sean T. Gilbert |
Well, it's not that necessary but it would have been nice if it's done already. I suggest to close this issue. Cheers |
Have installed latest nugget package and no WithViewBag support... Do I need anything else ? Bruno |
Hi @brunobertechini, This work hasn't been merged into the codebase because there is still work to do on it. Feel free to look at the comments above and take the work so far and get it into a PR of your own :) |
ba97591
to
49b5b84
Compare
Added support for fluent validation for ViewBag and ViewData in the ViewResultTest class using WithViewBag and WithViewData methods respectively. Added ImpromptuInterface reference to check ViewBag dynamic collection for member name passed in.
http://nuget.org/packages/ImpromptuInterface/
Added unit tests in ViewResultTestTests class to validate 2 new methods.
Use: Adding unit test for ASP.NET MVC default HomeController