public void SuccessBooleanResponseBuilder_EmptyMultiFeedback_EnumerableBody()
        {
            var response = new Response(null);
            var builder  = new SuccessBooleanResponseModifier();

            builder.AddMultiFeedback(response, new List <Feedback>());

            Assert.IsAssignableFrom <IEnumerable>(response.ResourceBody);
        }
        public void SuccessBooleanResponseBuilder_MultiFeedback_SuccessTrue()
        {
            var response = new Response(null);
            var builder  = new SuccessBooleanResponseModifier();

            builder.AddMultiFeedback(response, new List <Feedback>
            {
                new AcknowledgmentFeedback(new Acknowledgment())
            });

            var enumerable = Assert.IsAssignableFrom <IEnumerable>(response.ResourceBody);
            var itemData   = enumerable.Cast <RestItemData>().Single();

            Assert.Equal(true, itemData[SuccessBooleanResponseModifier.SuccessKey]);
        }
        public void SuccessBooleanResponseBuilder_SingleErrorFeedback_SuccessFalse()
        {
            var response = new Response(null);
            var builder  = new SuccessBooleanResponseModifier();

            builder.AddMultiFeedback(response, new List <Feedback>
            {
                new ErrorFeedback(new ErrorInfo(ErrorStatus.InternalServerError, "db", "There was a database error for this one.")),
            });

            var enumerable = Assert.IsAssignableFrom <IEnumerable>(response.ResourceBody);
            var itemData   = enumerable.Cast <RestItemData>().Single();

            Assert.Equal(false, itemData[SuccessBooleanResponseModifier.SuccessKey]);
        }