If you’re too lazy or just plain impatient, you can find the source code here. So one of the biggest pains in a place that doesn’t lend itself well to be in pain has been trying to unit test web forms like how MVC controllers can be. Before 4.0, this was an aggrevation at the [...]
MVC3, Entity Framework, jQuery… Everything example
How would you like to have a project that has these features? Dependency Injection Entity Framework 4.0 with POCO Inversion of Control with Castle The IResult jQuery jQuery Ajax Posts jQuery Custom Css jQuery Validation Mocking with Rhino Mocks MVC 3/Razor MVC Annotation Based Validation What I call the Repository Pattern Unit Tests – Integration [...]
Mock SQLAlchemy scoped_session query and Why Python is My BFF
sqlAlchemy has sessionmaker to create a session from which you can use query to get whatever you need. For example: someSession.query(SomeTableRepresentationObject).filter…ect If you’ve used sqlalchemy, nothing new going on here but it wouldn’t be me if I didn’t point out the obvious and take three sentences to do so. Now what you may run into [...]
How to Use a Factory Method With Castle / WindsorContainer
In my last post, I showed you the wonder of the WindsorContainer and creating concrete objects from a config file… but I wasn’t done yet. In fact, if you looked at my example and used your keen sense of observation (I’m suspending my disbelief) you might have noticed a little somethin’ somethin’ in the config [...]
Castle, Rhino, Mocking, and Possibly You
So here’s the issue, you have a class that you new up within a class. class SomeClass { private HelperClass someHelperClass; public SomeClass() { someHelperClass = new HelperClass(); } public String DoSomething() { return someHelperClass.DoSomeThing(); } } You with me? Cause if you’re not, you’ve probably made a serious error in career choice. Now what’s [...]