Skip to content

Classes for aiding with test automation of EPiServer websites

Notifications You must be signed in to change notification settings

solita/episerver-testing

Repository files navigation

solita-episerver MyGet Build Status

Solita EpiServer testing

Contains classes for aiding with test automation of EPiServer websites. Most of these classes are fakes or mocks of EPiServer types.

What's included

  • FakeContentRepository: simplified fake implementation of content repository.
  • FakeContentArea: content area with no dependency to EPiServer context.
  • FakeUrlResolver: simplified fake implementation of UrlResolver.
  • CreatePage/CreateSharedBlock: factories for creating instances of pages and shared blocks. These handle all the necessary proxy magic.

Requirements

.NET 4.6 (for the test project). EpiServer 9.x, but could be compatible with newer versions as well.

Usage example

[TestMethod]
public void TestArticleImport()
{            
    var contentRepository = new FakeContentRepository();
    var importer = new ArticleImporter(contentRepository, ...);

    importer.Import(fileStream);

    var articles = contentRepository.Contents.OfType<ArticlePage>();
    Assert.AreEqual(2, articles.Count(), "Number of articles imported");
}    

CI

Master branch is automatically compiled into a nuget in Solita's public nuget feed. Feed and build services provided by MyGet.

About

Classes for aiding with test automation of EPiServer websites

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages