codeflood logo

Posts from 2020

Unit Testing Sitecore Components Part 5: Recap and Resources

This is the final post in my "Unit Testing Sitecore Components" series. In this series I've taken a seemingly simplistic Sitecore component and refactored it by applying several principals to make the code more reusable and testable. In this final post of the series I'll recap the principals and provide a few resources to help explain them further.

Unit Testing Sitecore Components Part 4: Mocking Items and Fields

In the previous posts of this series, I've refactored an existing Sitecore component to make it's logic more reusable and prepare the component and the logic it includes for unit testing. In this post I'll be writing the unit tests for the refactored EntryTaxonomy class, showing how to mock items and field values.

WeBlog 4.1 Released

WeBlog 4.1 has been released. The main feature of WeBlog 4.1 is support for Sitecore 10.0. You'll find the Sitecore packages for various Sitecore versions on the release page at https://github.com/WeTeam/WeBlog/releases/tag/release%2F4.1.

Unit Testing Sitecore Components Part 3: Avoid Static Members

In the posts of this series so far, I've refactored a sample view rendering to make the rendering itself unit testable. In doing do I've extracted the business logic to a separate class which still needs some work before it can be properly tested. In this post, I'll be covering 2 more principals to help with making Sitecore components more testable and reusable.

Unit Testing Sitecore Components Part 2: Encapsulate Logic

In the previous post of this series I detailed 2 principals which can help with making Sitecore components more testable and reusable. These were "keeping the business logic out of the view" and "keeping the Item class out of the model". In this post I'll detail several more principals to continue improving the code.

WeBlog 4.0.1 Released

WeBlog 4.0 and 4.0.1 have been released. Version 4.0.1 is a bugfix release, so it's recommended to use that over the 4.0 release. You'll find the Sitecore packages for various Sitecore versions on the release page at https://github.com/WeTeam/WeBlog/releases/tag/release%2F4.0.1.