Hi Rafael, There is no built-in assertion to do that yet :(
In fact, an extension of MbUnit dedicated to web apps is foreseen<http://gallio.org/wiki/doku.php?id=mbunit:ideas> (MbUnit.Framework.Web) That extension would ideally contain some useful assertions and helper features for technologies such as ASP.NET MVC. But I don't know precisely what would be worth to add in that extension... Otherwise if your requirements are more general, we could easily create a couple of assertions to work with attributes (e.g. Assert.HasAttribute or something) What sort of assertions would you need? Yann. 2010/9/10 Rafael <rafae...@gmail.com> > Hi folks, > > I was trying out the MbUnit Frameworks these days in an ASP.NET MVC 2 > application and I wondering how to make an unit test for my models, > that uses data annotations for the validation. > > I saw that there's isn't an assertion to check if some property is > "Required" for example. And I end up doing by the common way, but I > was wondering if these things can be added on the framework (I'm not > asking for nothing, just a suggestion) because we need to write some > considerable amount of code to check the attribute from a property > (even if its possible to create a separated method, like a helper to > do that). > > Well, if I the framework provides something to check this kind of > thing, please show me, otherwise the suggestion is here! > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "MbUnit.User" group. > To post to this group, send email to mbunitu...@googlegroups.com. > To unsubscribe from this group, send email to > mbunituser+unsubscr...@googlegroups.com<mbunituser%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/mbunituser?hl=en. > > -- You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to mbunitu...@googlegroups.com. To unsubscribe from this group, send email to mbunituser+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/mbunituser?hl=en.