public void GetBinderThrowsExceptionWithNullContextTest()
        {
            var sut = new ProfileFilterModelBinderProvider();

            Action action = () => sut.GetBinder(null);

            action.Should().Throw <ArgumentNullException>();
        }
        public void GetBinderReturnsNullForUnsupportedTypeTest()
        {
            var context         = Substitute.For <ModelBinderProviderContext>();
            var provider        = Substitute.For <IModelMetadataProvider>();
            var detailsProvider = Substitute.For <ICompositeMetadataDetailsProvider>();
            var key             = ModelMetadataIdentity.ForType(typeof(string));
            IEnumerable <object> typeAttributes = new List <object>();
            var attributes = new ModelAttributes(typeAttributes);
            var details    = new DefaultMetadataDetails(key, attributes);
            var metadata   = new DefaultModelMetadata(provider, detailsProvider, details);

            context.Metadata.Returns(metadata);

            var sut = new ProfileFilterModelBinderProvider();

            var actual = sut.GetBinder(context);

            actual.Should().BeNull();
        }