Skip to content

Instantly share code, notes, and snippets.

View marcduiker's full-sized avatar
/-/

Marc Duiker marcduiker

/-/
View GitHub Profile
@marcduiker
marcduiker / nunit_test_method.snippet
Created June 10, 2013 20:49
Visual Studio snippet for an NUnit test method using the common naming convention by @royosherove.
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>NUnit Test Method</Title>
<Shortcut>nutest</Shortcut>
<Description>Code snippet for an NUnit test method following the naming convention UnitOfWork_StateUnderTest_ExpectedBehaviour.</Description>
@marcduiker
marcduiker / ms_test_method.snippet
Created June 10, 2013 20:51
Visual Studio snippet for an MSTest test method using the common naming convention by @royosherove.
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Visual Studio Test Method</Title>
<Shortcut>mstest</Shortcut>
<Description>Code snippet for a Visual Studio test method following the naming convention UnitOfWork_StateUnderTest_ExpectedBehaviour.</Description>
@marcduiker
marcduiker / extensionmethod.snippet
Last active December 19, 2015 08:59
Visual Studio snippet for an extension method.
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Extension Method</Title>
<Author>Marc Duiker</Author>
<Description>Snippet to create an extension method.
using Sitecore.Data;
using Sitecore.Data.Items;
namespace SitecorePlayground.Common.Interfaces.Providers
{
public interface IItemProvider
{
Item GetItem(ID itemId);
}
}
using Sitecore.Data;
using Sitecore.Data.Items;
using SitecorePlayground.Common.Interfaces.Providers;
namespace SitecorePlayground.Common.Providers
{
public class ItemProvider : IItemProvider
{
public Item GetItem(ID itemId)
{
namespace SitecorePlayground.News.Models
{
public class Author
{
public string Name { get; set; }
public string Company { get; set; }
}
}
using Sitecore.Data;
using Sitecore.Data.Items;
using SitecorePlayground.Common.Interfaces.Providers;
using SitecorePlayground.News.Models;
namespace SitecorePlayground.News.Providers
{
public class AuthorProviderBasedOnRegularItem
{
using System;
using Moq;
using NUnit.Framework;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.FakeDb;
using Sitecore.Data;
using Sitecore.Data.Items;
using SitecorePlayground.Common.Interfaces.Adapters;
namespace SitecorePlayground.Common.Interfaces.Providers
{
public interface IItemProvider
{
Item GetItem(ID itemId);
using System.Collections.Generic;
using Sitecore.Data;
using Sitecore.Data.Items;
namespace SitecorePlayground.Common.Interfaces.Adapters
{
public interface IItemAdapter
{
string DisplayName { get; }