/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
- using System;
- using Bifrost.Sagas;
- using Bifrost.Validation;
- using Machine.Specifications;
- using Moq;
- using It = Machine.Specifications.It;
-
- namespace Bifrost.Specs.Validation.for_ChapterValidatorProvider
- {
- [Subject(typeof (ChapterValidatorProvider))]
- public class when_getting_a_validator_for_chapter_with_no_validator : given.a_chapter_validator_provider
- {
- static IChapterValidator chapter_validator;
- static Mock<IChapter> chapter_mock;
-
- Establish context = () => chapter_mock = new Mock<IChapter>();
-
- Because of = () => chapter_validator = chapter_validator_provider.GetValidatorFor(chapter_mock.Object);
-
- It should_return_a_null_chapter_validator = () => chapter_validator.ShouldBeOfType(typeof(NullChapterValidator));
- }
- }