Search / 12 posts tagged Moq
Subscribe-
Mocking and Dependency Injection in ASP.NET MVC
http://www.emadibrahim.com/ 2008/ 08/ 27/ mocking-and-dependency-injection-in-as…Here is the situation, my controller constructors take multiple interfaces as parameters. I do this in order to use constructor injection which allows me to inject the controllers with mocked objects in my unit tests. For example, my AccountController takes IEmailService, IFormsAuthentication and MembershipProvider (abstract class) as parameters.
-
MoQs RoX
http://statestreetgang.net/ post/ 2008/ 06/ MoQs-RoX.aspxAfter the big refactor last iteration we're working on the unit tests. One of the things I wanted to get done was to replace all our lousy stubs (none of which would compile now after the refactor) with a true mock framework. When considering framework candidates, I had three requirements: First, it had to be easy to learn and use.
-
LINQ and Entity Framework Posts for 5/22/2008+
http://oakleafblog.blogspot.com/ 2008/ 05/ linq-and-entity-framework-posts-for_2…Note: This post is updated daily or more frequently, depending on the availability of new articles. SQL Server Data Services Rolls Out "Sprint 2" Upgrade The SQL Server Data Services (SSDS) team's Sprint 2 goes live post of May 26, 2008 announces the second upgrade to SSDS servers were completed last week.
-
Unit Tests for WCF (and Moq) Part II
http://weblogs.asp.net/ cibrax/ archive/ 2008/ 05/ 20/ unit-tests-for-wcf-and-mo…My latest post about "creating wrapper classes" for mocking the WCF context has started generating some controversies. I initially wrote those classes to decouple my service implementation from the concrete implementation of the WCF context, something that did not have anything to do with the static nature of the context.
-
Unit tests for WCF (And Moq)
http://weblogs.asp.net/ cibrax/ archive/ 2008/ 05/ 16/ unit-tests-for-wcf.aspxAs you may know, testing WCF services is not as simple as referencing a service implementation and start writing unit tests against it. If the service we want to test has a high dependency with the operation context, which is an static class, testing that service can be a very complicated task.
-
Unit tests for WCF (And Moq)
http://weblogs.asp.net/ cibrax/ archive/ 2008/ 05/ 16/ unit-tests-for-wcf.aspxAs you may know, testing WCF services is not as simple as referencing a service implementation and start writing unit tests against it. If the service we want to test has a high dependency with the operation context, which is an static class, testing that service can be a very complicated task.
-
ValidationResult FTW!
http://www.madprops.org/ cs/ blogs/ mabster/ archive/ 2008/ 04/ 17/ validationre…In a previous post I described a "ValidationResult" class we've created here at work for "lazy validation", where the "IsValid" property is a nullable boolean and is set to null if the code can't determine its value without the user's help.
-
Unit Test Linq to Sql in ASP.Net MVC with Moq
http://www.emadibrahim.com/ 2008/ 04/ 04/ unit-test-linq-to-sql-in-aspnet-mvc-wi…I have just spent the entire day playing with Moq to unit test an asp.net mvc application I am working with. All I wanted to do is test a “create” method that simply adds a record to the database. So here it goes. 1. I created a Mock Http context to be used by my controller.
-
Comparing Moq to Rhino Mocks
http://haacked.com/ archive/ 2008/ 03/ 23/ comparing-moq-to-rhino-mocks.aspxUPDATE: I should have entitled this “Comparing Rhino Mocks and MoQ for State Based Testing”. I tend to prefer state-based testing over interaction based testing except in the few cases where it is absolutely necessary or makes the test much cleaner. When it is necessary, it is nice to have interaction based testing available.
About / rising and falling
Find posts and stories that have something in common using this weighted list of phrases, where popularity is represented by size. Learn more...
