Telerik blogs
  • Productivity

    Why Mocking Matters

    How does mocking benefit me?  That’s a question I hear a lot as I travel around the world giving talks.  So before we dive into how to use a mocking tool like JustMock, let’s discuss why this is important and the benefit that mocking provides over other techniques like Fakes. In my post on Why SOLID Matters, we refactored a small piece of code to be more SOLID.  Granted, it was a simplistic example, but good for illustrating several key points on SOLID.  We will continue using the same code to discuss the benefits of Mocking.  As a refresher, we ended...
    May 27, 2021 10 min read
  • Productivity Testing

    Getting Started with NUnit, NUnit.Should, and JustMock

    Technorati Tags: TDD,Test Driven Development,JustMock,JustCode,NUnit,NUnit.Should,Mocking Before diving into mocking with JustMock, it’s important to note that JustMock is a mocking framework, and not a testing framework.  Test frameworks allow for creating Test Fixtures, which are .NET classes decorated with the appropriate attributes so they are picked up by a Test Runner.  Test are created within a Test Fixture by writing methods (with the appropriate attributes) that exercise your code (also referred to as the System Under Test) and report the results.  Test Runners are programs that will run your tests.  There are many free testing frameworks available for .NET developers, including MSTest (included...
    February 01, 2022 12 min read
  • Release

    New Mocking Capabilities in JustMock Q3 2011 SP

    Telerik JustMock received many new features in the service pack for the Q3 2011 release, enhancing the mocking framework’s impressive ability to mock almost everything. Let’s take a look at a few highlights of JustMock Q3 2011 SP. Mock Inside a Threadpool Mock objects can be accessed inside of another thread and work as expected. var mockable = Mock.Create<Mockable>(); Mock.Arrange(() => mockable.IsMocked).Returns(true); bool mocked = false; var latch = new WaitLatch(); ThreadPool.QueueUserWorkItem(cookie => { try { mocked = mockable.IsMocked; } finally { ...
    May 27, 2021 3 min read
  • Productivity

    Mocking the File System to Improve Testability (with JustMock)

    Many applications require access to the file system to create, modify or delete files and folders. But how do you make sure that such application behaves correctly? You do it with tests of course but there is a catch: In general it is not a good idea to have tests that are performing Input/Output operations like accessing files and databases. When you need to test I/O operations mock objects are your friend. And before I go into more details let me point out some of the benefits of mocking. Usually faster than performing I/O operations You do not have have to deal...
    May 27, 2021 5 min read
  • Release

    Online Launch of 3 new Telerik products – JustMock, TeamPulse and WebUI Test Studio

    As you probably already know we have introduced 3 new products in the last 10 days, two of them at DevConnections in Las Vegas alone. If you didn’t get a chance to attend DevConnections, we have organized an “online launch” so you get to see our new products first hand. Here is the schedule: Introduction to Telerik JustMock – Tuesday, April 20 @11am ET Join the online launch of JustMock - a new developer productivity tool from Telerik designed to make it easy to create unit tests. In this webinar you will find out what is in the current release and learn about...
    May 27, 2021 3 min read