public void Should_pass_SiteBase_from_context_to_serializtion()
        {
            // given
            var serializer = A.Fake <IRdfSerializer>();

            A.CallTo(() => serializer.CanSerialize(A <MediaRange> .Ignored)).Returns(true);
            var processor = new RdfResponseProcessorTestable(new[] { serializer });

            // when
            var response = processor.Process(new MediaRange("application/rdf+xml"), new object(), NancyContext);

            response.Contents(new MemoryStream());

            // then
            A.CallTo(() => serializer.Serialize(
                         A <MediaRange> .That.Matches(mr => mr == RdfSerialization.RdfXml.MediaType),
                         A <WrappedModel> .That.Matches(wm => wm.BaseUrl == new Uri(NancyContext.Request.Url.SiteBase)),
                         A <MemoryStream> ._)).MustHaveHappened();
        }
        public void Should_pass_actual_requested()
        {
            // given
            var contentType = new MediaRange("application/rdf+xml;profile=testprofile");
            var serializer  = A.Fake <IRdfSerializer>();

            A.CallTo(() => serializer.CanSerialize(A <MediaRange> .Ignored)).Returns(true);
            var processor = new RdfResponseProcessorTestable(new[] { serializer });

            // when
            var response = processor.Process(new MediaRange(contentType), new object(), NancyContext);

            response.Contents(new MemoryStream());

            // then
            A.CallTo(() => serializer.Serialize(
                         A <MediaRange> .That.Matches(mr => mr.Equals(contentType)),
                         A <WrappedModel> ._,
                         A <MemoryStream> ._)).MustHaveHappened();
        }
        public void WhenProcessingRdfModel()
        {
            var processor = new RdfResponseProcessorTestable(new[] { this.serializer });

            this.response = processor.Process(this.mediaRange, new object(), new NancyContext());
        }