public void DefaultAttachmentExtractor_should_be_returned_when_Type_is_set_to_default()
        {
            AttachmentExtractorSettings.AttachmentExtractorType = AttachmentExtractorType.Default;
            var result = AttachmentExtractorFactory.GetAttachmentExtractor();

            result.Should().BeOfType <DefaultAttachmentExtractor>();
        }
        public void InvalidOperationException_should_be_thrown_when_Type_is_set_to_custom_but_custom_attachment_extractor_has_not_been_set()
        {
            AttachmentExtractorSettings.AttachmentExtractorType   = AttachmentExtractorType.Custom;
            AttachmentExtractorSettings.CustomAttachmentExtractor = null;

            Action act = () => AttachmentExtractorFactory.GetAttachmentExtractor();

            act.ShouldThrow <InvalidOperationException>();
        }
        public void Custom_attachment_extractor_should_be_returned_when_Type_is_set_to_custom()
        {
            AttachmentExtractorSettings.AttachmentExtractorType = AttachmentExtractorType.Custom;
            var attachmentExtractor = Substitute.For <IAttachmentExtractor>();

            AttachmentExtractorSettings.CustomAttachmentExtractor = attachmentExtractor;

            var result = AttachmentExtractorFactory.GetAttachmentExtractor();

            result.Should().Be(attachmentExtractor);
        }
Beispiel #4
0
        public SigninCardSetAssertions(IEnumerable <Activity> activitySet) : this()
        {
            var attachmentExtractor = AttachmentExtractorFactory.GetAttachmentExtractor();

            SigninCards = attachmentExtractor.ExtractCards <SigninCard>(activitySet);
        }
Beispiel #5
0
        public SigninCardSetAssertions(Activity activity) : this()
        {
            var attachmentExtractor = AttachmentExtractorFactory.GetAttachmentExtractor();

            SigninCards = attachmentExtractor.ExtractCards <SigninCard>(activity);
        }
        public ThumbnailCardSetAssertions(Activity activity) : this()
        {
            var attachmentExtractor = AttachmentExtractorFactory.GetAttachmentExtractor();

            ThumbnailCards = attachmentExtractor.ExtractCards <ThumbnailCard>(activity);
        }
        public ReceiptCardSetAssertions(Activity activity) : this()
        {
            var attachmentExtractor = AttachmentExtractorFactory.GetAttachmentExtractor();

            ReceiptCards = attachmentExtractor.ExtractCards <ReceiptCard>(activity);
        }