PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost.Specs/Validation/for_ChapterValidatorProvider/when_getting_a_validator_for_chapter_with_no_validator.cs

#
C# | 22 lines | 18 code | 4 blank | 0 comment | 0 complexity | 346a9034a060601a0d59b54d334ef4d4 MD5 | raw file
 1using System;
 2using Bifrost.Sagas;
 3using Bifrost.Validation;
 4using Machine.Specifications;
 5using Moq;
 6using It = Machine.Specifications.It;
 7
 8namespace Bifrost.Specs.Validation.for_ChapterValidatorProvider
 9{
10    [Subject(typeof (ChapterValidatorProvider))]
11    public class when_getting_a_validator_for_chapter_with_no_validator : given.a_chapter_validator_provider
12    {
13        static IChapterValidator chapter_validator;
14        static Mock<IChapter> chapter_mock;
15
16        Establish context = () => chapter_mock = new Mock<IChapter>();
17
18        Because of = () => chapter_validator = chapter_validator_provider.GetValidatorFor(chapter_mock.Object);
19
20        It should_return_a_null_chapter_validator = () => chapter_validator.ShouldBeOfType(typeof(NullChapterValidator));
21    }
22}