Telerik blogs
  • Productivity

    Mocking SPContext.Current with JustMock

    Today, I happen to find an interesting post on mocking SharePoint context using TypeMock. Being a JustMocker, i thought rather to follow the footsteps and see if can do the same with JustMock. I am no SharePoint expert. Occasionally, I use a Windows 2003 VM with SharePoint server installed which gives me the required flavor of SharePoint for testing  SP capabilities of JM. Anyway, here is the original post that i am going to recycle using JustMock. http://meronymy.blogspot.com/2010/09/mocking-spcontextcurrent-with-typemock.html   The scenario here is pretty simple. There is a method that returns an URL from the current SPContext which i am going to mock in order...
    May 27, 2021 1 min read
  • Productivity

    JustCode Code Templates

    Template Basics JustCode templates are much like Visual Studio code snippets. They give you a chance to seamlessly generate a piece of code following a predefined structure. In the general case you just have to pick up the real content, i.e. the stuff that actually defines the logic of the code, from a set of possible choices that JustCode computes for you. All the boilerplate code is automatically generated for you. For example, here is how the C# built-in foreach code template  normally works out: Step 1 – Expand the template Step 2 – Choose a collection variable to iterate over   Notice how the type of e automatically changes from string to int   Step...
    May 27, 2021 5 min read
  • Release

    Service Pack for JustCode Q2 released

      This week we release a service pack for JustCode Q2 2010. You can get the full details about the release here, but I wanted to point out a few highlights that might be of interest. New auto-updating functionality This service pack improves the current auto-updating functionality with the addition of one new option. By now you could get notifications only when a new official release or service pack was available. With this new option you will get notified for available internal builds as well. By default it is on, but if prefer to stick only to the official released versions you can switch...
    May 27, 2021 2 min read
  • Productivity

    JustMock. The tale continues... (Part 4)

    Last time we saw how to inject code in properties and static methods (including ones defined in static types). So far we are able to inject code in most common scenarios. In rare cases there is a need to isolate methods from mscorlib. In this post I will show you how do to this. Let's start with a demo program that I will explain in...
    May 27, 2021 5 min read