Beispiel #1
0
        public async Task InvalidApplicationDescription()
        {
            var store = new DirectoryStore("tmp");

            await store.Invoking(s => s.GetLocalCertificateAsync(null))
            .Should().ThrowAsync <ArgumentNullException>();
        }
Beispiel #2
0
        public async Task ValidateCertificateNull()
        {
            using (var dir = TempDirectory.Create())
            {
                var store = new DirectoryStore(dir.Name, acceptAllRemoteCertificates: false);

                await store.Invoking(s => s.ValidateRemoteCertificateAsync(null))
                .Should().ThrowAsync <ArgumentNullException>();
            }
        }
Beispiel #3
0
        public async Task InvalidApplicationUri(string uri)
        {
            var store = new DirectoryStore("tmp");

            var app = new ApplicationDescription
            {
                ApplicationUri = uri,
            };

            await store.Invoking(s => s.GetLocalCertificateAsync(app))
            .Should().ThrowAsync <ArgumentOutOfRangeException>();
        }