public void GetMessageProviderFactoryShouldThrowIfRuleInterfaceIsInvalid([AutofixtureServices] IServiceProvider serviceProvider,
                                                                          MessageProviderFactoryStrategyProvider sut)
 {
     Assert.That(() => sut.GetMessageProviderFactory(new MessageProviderTypeInfo(typeof(OneGenericProvider), default), typeof(bool)), Throws.ArgumentException);
 }
 public void GetMessageProviderFactoryShouldReturnADoubleGenericStrategyIfTheProviderTypeIsAmbiguousButMatchesADoubleGenericRule([AutofixtureServices] IServiceProvider serviceProvider,
                                                                                                                                 MessageProviderFactoryStrategyProvider sut)
 {
     Assert.That(() => sut.GetMessageProviderFactory(new MessageProviderTypeInfo(typeof(MultipleInterfaceProvider), default), typeof(IRule <string, int>)), Is.InstanceOf <DoubleGenericMessageProviderStrategy>());
 }
 public void GetMessageProviderFactoryShouldReturnANonGenericProviderIfSpecified([AutofixtureServices] IServiceProvider serviceProvider,
                                                                                 MessageProviderFactoryStrategyProvider sut)
 {
     Assert.That(() => sut.GetMessageProviderFactory(new MessageProviderTypeInfo(typeof(NonGenericProvider), default), typeof(IRule <string, int>)), Is.InstanceOf <NonGenericMessageProviderStrategy>());
 }
 public void GetMessageProviderFactoryShouldReturnNullForAProviderTypeWhichDoesNotMatchTheRuleInterface([AutofixtureServices] IServiceProvider serviceProvider,
                                                                                                        MessageProviderFactoryStrategyProvider sut)
 {
     Assert.That(() => sut.GetMessageProviderFactory(new MessageProviderTypeInfo(typeof(OneGenericProvider), default), typeof(IRule <bool>)), Is.Null);
 }
 public void GetMessageProviderFactoryShouldReturnASingleGenericStrategyForAProviderTypeWhichMatchesTheFirstTypeOfADoubleGenericRule([AutofixtureServices] IServiceProvider serviceProvider,
                                                                                                                                     MessageProviderFactoryStrategyProvider sut)
 {
     Assert.That(() => sut.GetMessageProviderFactory(new MessageProviderTypeInfo(typeof(OneGenericProvider), default), typeof(IRule <string, int>)), Is.InstanceOf <SingleGenericMessageProviderStrategy>());
 }