| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
3 Articles match "Article","Unit Testing"
| Related DevelopMentor Courses | MORE | | Screening C# Candidates: Let’s Play 20 Questions! For example, someone might be called upon to build a WPF app retrieving data from a WCF service that queries a SQL database using Entity Framework with Ninject for dependency injection and MOQ for unit testing. The only way to test for those things is to perform an in-depth technical interview performed by a senior technical specialist. If a person has ever bothered to read a book or technical article or taken a training course, their answers will set them apart from the crowd of folks who don’t make time for ongoing professional development. > reference 2. DevelopMentor Courses - Tuesday, February 28, 2012 Use Common Instance Factory to Abstract Away the Dependency Injection Container lot of DI-specific code is needed for unit tests, where there is extensive mocking, and advanced features of a DI container such as Ninject come in handy. In his article, Inversion of Control Containers and the Dependency Injection Pattern , Martin Fowler describes some of the weaknesses of the service locator anti-pattern. Here is a unit test that demonstrates the usage. Download the Common Instance Factory with WCF Extensions here and is also available on NuGet. In this example, an IGreetingRepository is passed to the GreetingService’s constructor. DevelopMentor Courses - Wednesday, May 23, 2012 I fail at TDD? While writing the test for my Scanner class, I wrote it so that it would assert on the sequence of tokens it returns. figured this would be the easiest way to start testing my Scanner class. The test probably looked like this (I’m writing this way after the fact): [Test] public void It_scans_literal_text() { var scanner = new Scanner(); var parts = scanner.Scan("foo"); CollectionAssert.AreEqual(new Part[] { new LiteralText("foo"), }, parts); }. At this point, I was able to compile and run my test. Some tests just don’t need anything to be set up! DevelopMentor Courses - Friday, October 29, 2010 |
21 Articles match "Article","Unit Testing"
| The Latest from DevelopMentor | MORE | | Use Common Instance Factory to Abstract Away the Dependency Injection Container lot of DI-specific code is needed for unit tests, where there is extensive mocking, and advanced features of a DI container such as Ninject come in handy. In his article, Inversion of Control Containers and the Dependency Injection Pattern , Martin Fowler describes some of the weaknesses of the service locator anti-pattern. Here is a unit test that demonstrates the usage. Download the Common Instance Factory with WCF Extensions here and is also available on NuGet. In this example, an IGreetingRepository is passed to the GreetingService’s constructor. DevelopMentor Courses - Wednesday, May 23, 2012 Screening C# Candidates: Let’s Play 20 Questions! For example, someone might be called upon to build a WPF app retrieving data from a WCF service that queries a SQL database using Entity Framework with Ninject for dependency injection and MOQ for unit testing. The only way to test for those things is to perform an in-depth technical interview performed by a senior technical specialist. If a person has ever bothered to read a book or technical article or taken a training course, their answers will set them apart from the crowd of folks who don’t make time for ongoing professional development. > reference 2. DevelopMentor Courses - Tuesday, February 28, 2012 Peeling Back the Onion Architecture Download the code for this article. MVC (which stands for Model-View-Controller) lends itself to an Agile development methodology where TDD and BDD (Test-Driven and Behavior-Driven Development) are important components. Writing applications that are testable requires that you separate business logic from presentation logic so that they can be independently tested. Representing your repositories and services as interfaces decouples consumers from concrete implementations, enabling you to swap one out for another without affecting consumers, such as client UI’s or tests. Tony and Zuzana's World - Saturday, October 8, 2011 | -
| The Best from DevelopMentor | MORE | - Article: Avoiding 5 Common Pitfalls in Unit Testing
Llewellyn Falco and I recently wrote an article for DevelopMentor's Developments newsletter entitled Avoiding 5 Common Pitfalls in Unit Testing. Avoiding 5 Common Pitfalls in Unit Testing. When I started out with unit tests, I was enthralled with the promise of ease and security that they would bring to my projects. In practice, however, the theory of sustainable software through unit tests started to break down. Unit Tests have become more trouble than they are worth.". Pitfall #1: Tests are hard to maintain. Michael C. Kennedy's Weblog - Thursday, August 6, 2009 - Significant Advances in Unit Testing Windows Workflow
This post describes a unit testing library for testing Windows Workflow Foundations. Rather it's a library that can be used in conjunction with any of these testing frameworks. Download the library with sample test project here: Kennedy.WorkflowTesting.zip (216 KB). First a Little History: Last September I posted this teaser entitled Unit Testing Coming to a Workflow Near You. My intention was to post this article that you're reading now shortly thereafter when I got some free time to polish things up. It's a good article to be sure. Michael C. Kennedy's Weblog - Sunday, January 18, 2009 - Unit Testing Coming to a Workflow Near You
[Update: See the follow up post "Significant Advances in Unit Testing Windows Workflow" ]. However you won't find very much support for Test Driven Development (TDD) or unit testing in general. In fact the architecture that makes Windows Workflow powerful (strict separation of workflow, activities, and the host for example) really gets in the way of unit tests. There has been some work done on unit testing Windows Workflows. Here's some links: Unit Testing Activities with Windows Workflow Foundation by Ron Jacobs. Michael C. Kennedy's Weblog - Tuesday, September 30, 2008 - TDD Invades Space Invaders
As a follow-up to our " Avoiding 5 Common Pitfalls in Unit Testing " article we did a webcast where we took a problem from the audience and solved it live and unrehearsed on stage. The thing to remember is that all of this was done for the sole purpose of creating a recipe for a scenario we could test. Create a new test project. We made it to step 4 during our presentation (download code below) and estimate another 15 minutes would have had the whole scenario done, tested, and well-factored. A joint post by Llewellyn Falco and Michael Kennedy. win }. Michael C. Kennedy's Weblog - Wednesday, October 28, 2009 - Unity, Multiple Constructors and Configuration
Its mostly straightforward as IoC containers go but one thing had me puzzled for a while as its not really documented or blogged as far as I can see; so I decided to blog it so hopefully others looking will stumble across this article. However to make Unit Testing simple I’ll add another constructor to MyService so I can pass a specific timeout. Tags: NET;IoC;Unit Testing I’ve been working with the Unity IoC container from Microsoft Patterns and Practices recently. 1: public interface IService. 3: void DoWork(); 4: }. 1: public interface IRepository. 10: {. .NET Meanderings - Monday, June 7, 2010 - Article: 10 Features in.NET 4.0 that made Me Smile
I recently wrote another article for DevelopMentor 's Developments newsletter (not subscribed yet? Code contracts allow you to assert truths about your code as if you are writing a unit test. Speaking of that XAML stuff, if you write WPF or Silverlight code and don’t know MVVM, stop reading this article and tp://msdn.microsoft.com/en-us/magazine/dd419663.aspx" target="_blank">learn about it here. Also have a look at my article from last month Six Things That’ll Surprise You About.NET 4.0. Tags: Articles DevelopMentor see top-right of this page ). Michael C. Kennedy's Weblog - Wednesday, December 16, 2009 - Significant Advances in Unit Testing Windows Workflow
This post describes a unit testing library for testing Windows Workflow Foundations.It Rather it’s a library that can be used in conjunction with any of these testing frameworks. Download the library with sample … Continue reading → Agile.NET agile Articles Visual Studio WF Workflowis not a framework like HarnessIt, NUnit, or MsTest. Michael C. Kennedy's Weblog - Sunday, January 18, 2009 %>
| | |