public void AddItem() { SymmetricCryptoProviderDataCollection collection = new SymmetricCryptoProviderDataCollection(); Assert.AreEqual(0, collection.Count); MockSymmetricCryptoProviderData providerData = new MockSymmetricCryptoProviderData(); providerData.Name = "provider1"; collection.Add(providerData); Assert.AreEqual(1, collection.Count); }
public void AddItem() { SymmetricCryptoProviderDataCollection collection = new SymmetricCryptoProviderDataCollection(); Assert.AreEqual(0, collection.Count); MockSymmetricCryptoProviderData providerData = new MockSymmetricCryptoProviderData(); providerData.Name = "provider1"; collection.Add(providerData); Assert.AreEqual(1, collection.Count); }
public void Indexer() { SymmetricCryptoProviderDataCollection collection = new SymmetricCryptoProviderDataCollection(); MockSymmetricCryptoProviderData providerData = new MockSymmetricCryptoProviderData(); providerData.Name = "provider1"; collection[providerData.Name] = providerData; Assert.AreEqual(1, collection.Count, "count"); SymmetricCryptoProviderData compareData1 = collection["provider1"]; Assert.AreSame(providerData, compareData1, "string indexer"); SymmetricCryptoProviderData compareData2 = collection[0]; Assert.AreSame(providerData, compareData2, "int indexer"); }
public void Indexer() { SymmetricCryptoProviderDataCollection collection = new SymmetricCryptoProviderDataCollection(); MockSymmetricCryptoProviderData providerData = new MockSymmetricCryptoProviderData(); providerData.Name = "provider1"; collection[providerData.Name] = providerData; Assert.AreEqual(1, collection.Count, "count"); SymmetricCryptoProviderData compareData1 = collection["provider1"]; Assert.AreSame(providerData, compareData1, "string indexer"); SymmetricCryptoProviderData compareData2 = collection[0]; Assert.AreSame(providerData, compareData2, "int indexer"); }