Exemplo n.º 1
0
 public void TestReadKey_EmptySettings()
 {
     _mockSettingsManager.Setup(s => s.GetString(SymmetricKeyStore.SettingsApplicationId, SymmetricKeyStore.SettingsKey)).Returns(string.Empty);
     var store = new SymmetricKeyStore(_mockSettingsManager.Object);
     var key = store.ReadKey();
     Assert.IsNull(key);
 }
Exemplo n.º 2
0
 public void TestReadKey()
 {
     _mockSettingsManager.Setup(s => s.GetString(SymmetricKeyStore.SettingsApplicationId, SymmetricKeyStore.SettingsKey)).Returns(_data1_encyptedString);
     var store = new SymmetricKeyStore(_mockSettingsManager.Object);
     var data = store.ReadKey();
     Assert.AreEqual(_data1, data);
 }