public void find_all_known()
        {
            var issuers = new SamlCertificate[]
            {
                new SamlCertificate{Issuer = "foo:bar1"}, 
                new SamlCertificate{Issuer = "foo:bar2"}, 
                new SamlCertificate{Issuer = "foo:bar3"} 
            };

            var repository = new BasicSamlCertificateRepository(issuers);

            repository.AllKnownCertificates().ShouldHaveTheSameElementsAs(issuers);
        }
        public void find_by_issuer()
        {
            var issuers = new SamlCertificate[]
            {
                new SamlCertificate{Issuer = "foo:bar1"}, 
                new SamlCertificate{Issuer = "foo:bar2"}, 
                new SamlCertificate{Issuer = "foo:bar3"} 
            };

            var repository = new BasicSamlCertificateRepository(issuers);
            repository.Find(issuers[0].Issuer).ShouldBeTheSameAs(issuers[0]);
            repository.Find(issuers[1].Issuer).ShouldBeTheSameAs(issuers[1]);
            repository.Find(issuers[2].Issuer).ShouldBeTheSameAs(issuers[2]);
        }
        public FubuApplication BuildApplication()
        {
            var repository = new BasicSamlCertificateRepository(new SamlCertificate[] {SamlCertificate});
            var container = new Container(x => {
                x.For<IPrincipalBuilder>().Use<SimplePrincipalBuilder>();
                x.For<ISamlCertificateRepository>().Use(repository);

                x.For<ISamlResponseHandler>().Use<FakeSamlResponseHandler>();
                x.For<ICertificateLoader>().Use(new InMemoryCertificateLoader(Certificate));
            });

            

            return FubuApplication.For<SamlStorytellerFubuRegistry>().StructureMap(container);
        }