A quick follow up to my last post. Even with EPiAbstractions, testing takes a lot of mocking and setup code… Testing this public void CreateOrtkoppling( int verksamhetsId )
{
var ortContainer = GetOrtContainer() ?? CreateOrtContainer();
CreateVerksamhetPage( ortContainer, verksamhetsId );
}
public PageData GetOrtContainer()
{
return (from p in _dataFactory.GetChildren( _page.PageLink )
where p.PageName == OrtContainerPageName
select p).SingleOrDefault();
}...
I’ve been working quite a lot with EPiServer in the last six years or so, and unit testing has always been a pain in the ass (not that I was writing unit tests anyway six years ago, I hardly knew what I was doing back then… can’t believe I actually got paid! :-)). And it still is, even in the latest version. Luckily there are some EPiServer developers that are either smarter than me, or just have more free time, for example Joel Abrahamson who has created a wrapper project, EPiAbstractions, fo...
This post was originally published on http://labs.dropit.se/blogs. Facebook Comments is a very useful widget for Facebook Connect, the integration platform for Facebook, allowing you to place a comments box on your web pages. As it uses the Facebook connect platform, it lets the users sign in with their Facebook accounts as well as publish their comments to their FB feed, making this a powerful marketing tool as well. Not that it is extremely difficult to integrate the comment box in your EP...
This post was originally published on http://labs.dropit.se/blogs. A colleague of mine - let's call him Erik Nilsson, since that is his name - recently came across a potential security problem when creating your own edit och admin plugin to EPiServer. Unfortunately, he's too shy to write a post about it, so I'll relay the information. If you create a plugin like this: [EPiServer.PlugIn.GuiPlugIn(
Area = EPiServer.PlugIn.PlugInArea.AdminMenu,
DisplayName = "Plugin name.",
Description = "...
This post was originally published on http://labs.dropit.se/blogs. On Wednesday, one of our oldest employees (as in has been working here for a long time, not really being that old) was appointed an EPiServer Most Valued Professional, or EMVP. A big congratulations to Fredrik Karlsson! I managed to get a little chat with him about how he feels about this and how he feels about EPiServer. Johan: So, Fredrik, congratulations on becoming an EMVP. Fredrik: Thank you. Tell us a little bit ab...
This post was originally published on http://labs.dropit.se/blogs. We recently upgraded our project to EPiServer 5 R2, and that made some strange things happen. I had a class that uses the EPiServer.DataFactory to manipulate pages, and in order to make it testable, I had the following constructors: private IPageStore _pageStore
public NovaImporter() : this( EPiServer.DataFactory.Instance )
{
}
public NovaImporter( IPageStore pageStore )
{
_pageStore = pageStore;
}
This worked just f...
This post was originally published on http://labs.dropit.se/blogs. When you're working in this line of business, developing web sites, that is, you're not that used to praise. Once a web site has been launched, most of what you hear is bugs and new feature requests. But once in a while we get the praise we deserve! :-) Today the Swedish magazine internetworld published a review of the public web sites for 6 of Sweden's largest unions. The site I have been working on, unionen.se, got 9/10, an...