PageRenderTime 48ms CodeModel.GetById 25ms RepoModel.GetById 0ms 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
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using Bifrost.Sagas;
  3. using Bifrost.Validation;
  4. using Machine.Specifications;
  5. using Moq;
  6. using It = Machine.Specifications.It;
  7. namespace Bifrost.Specs.Validation.for_ChapterValidatorProvider
  8. {
  9. [Subject(typeof (ChapterValidatorProvider))]
  10. public class when_getting_a_validator_for_chapter_with_no_validator : given.a_chapter_validator_provider
  11. {
  12. static IChapterValidator chapter_validator;
  13. static Mock<IChapter> chapter_mock;
  14. Establish context = () => chapter_mock = new Mock<IChapter>();
  15. Because of = () => chapter_validator = chapter_validator_provider.GetValidatorFor(chapter_mock.Object);
  16. It should_return_a_null_chapter_validator = () => chapter_validator.ShouldBeOfType(typeof(NullChapterValidator));
  17. }
  18. }