예제 #1
0
        public void GetMockSymmetricCryptoProvider()
        {
            string instance = "mockSymmetric1";
            SymmetricCryptoProviderFactory factory = new SymmetricCryptoProviderFactory(context);
            MockSymmetricCryptoProvider    store   = (MockSymmetricCryptoProvider)factory.CreateSymmetricCryptoProvider(instance);

            Assert.IsNotNull(store);
        }
예제 #2
0
        public void GetDefaultTest()
        {
            SymmetricCryptoProviderFactory factory = new SymmetricCryptoProviderFactory(context);

            ISymmetricCryptoProvider provider = factory.CreateSymmetricCryptoProvider("provider1");

            Assert.IsNotNull(provider);

            MockSymmetricCryptoProvider mockProvider = provider as MockSymmetricCryptoProvider;

            Assert.IsNotNull(mockProvider);
            Assert.IsTrue(mockProvider.Initialized);
        }