コード例 #1
0
        public void RepositoryNotInListAfterBeingRemoved()
        {
            var provider1 = Substitute.For <ICredentialRepository>();

            provider1.Config.Id.Returns(Guid.NewGuid());
            var provider2 = Substitute.For <ICredentialRepository>();

            provider2.Config.Id.Returns(Guid.NewGuid());
            _credentialCatalog.AddProvider(provider1);
            _credentialCatalog.AddProvider(provider2);
            _credentialCatalog.RemoveProvider(provider1);
            Assert.That(_credentialCatalog.CredentialProviders, Is.EquivalentTo(new[] { provider2 }));
        }
        public void WhenIRemoveTheFirstRepository()
        {
            var firstRepo = _credentialRepositoryList.CredentialProviders.First();

            _credentialRepositoryList.RemoveProvider(firstRepo);
        }