Geeks With Blogs

News Infragistics JQuery Advertisement
----------------
profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers

Check out Elapser from T3rse!
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.
Programming and Learning from SD BDD Behavior Driven Development http://dannorth.net/introducing-bdd/
Getting Started with Behavior Driven Development
In this post, I wanted to share some thoughts and resources that I’ve collected since learning about Behavior Driven Development (BDD) (as of June 2013). Thinking in BDD terms has really helped me in improving my software development and thinking through problems. I remember a day when it clicked. It was an exciting time for me and I don’t planning on going back to the old approach. My tendency is to dive into the code before thinking through things and that gets me into trouble. I’m also an optimistic ......

Posted On Tuesday, June 11, 2013 10:18 AM

Faking the WebApi User
I needed to unit test a WebAPI call in my MVC 4 application that checks the user's role. I'm doing this in my MVC controllers with the following code using FakeItEasy (I should do a post on that sometime): this.UserPrincipalFake = A.Fake<IPrincipal>(); A.CallTo(() => this.UserPrincipalFake.Iden... A.CallTo(() => this.UserPrincipalFake.Iden... this.HttpContextBaseFake = A.Fake<HttpContextBase&g... this.HttpContextBaseFake.User ......

Posted On Wednesday, June 5, 2013 10:29 AM

Jasmine Specification Testing Pointers
I’ve been using Jasmine JavaScript testing library for Behavior Driven Development testing the last few months with KnockoutJs view models and the Revealing Module Pattern. We now have 244 specs on a system that will be around and hopefully expand. I was hired to get it going, then others will maintain it and add to it after I’m gone. They have helped me think through what needs to happen (when {X} it should do this), test functionality with out having to click through things and help stop me from ......

Posted On Friday, April 5, 2013 3:18 PM

Mocking or Faking DbSet
I needed to Fake the DbSet of a DBContext in EF 5 so that I could test my caching implementation. I searched for awhile and found this link on creating an in memory DbSet. I first copied the code in and created an InMemoryDbSet class. Then I changed all my DbSets in my DBContext to IDbSet. Then I was able to mock the call to UserProfiles and return a dummy object. The Test I’m using FakeItEasy which is a nuget packages. Notice the usage of the InMemoryDbSet<UserProfil... [TestInitialize] public ......

Posted On Wednesday, December 12, 2012 11:14 AM

Copyright © Aligned | Powered by: GeeksWithBlogs.net | Join free