/// <summary>
 /// This scenario verifies the Unregister method
 /// </summary>
 public static void UnRegistrationTest(RegistrationAttribute attributeUnderTest, BaseRegistrationContextMock contextMock)
 {
     attributeUnderTest.Unregister(contextMock);
     Assert.IsTrue(contextMock.RegistryEntries.Count == 0);
 }
        public static void RegistrationTest(RegistrationAttribute attributeUnderTest, Hashtable expectedValues, BaseRegistrationContextMock contextMock)
        {
            attributeUnderTest.Register(contextMock);

            //Verify if the number of the registry entries is the same
            Assert.IsTrue(contextMock.RegistryEntries.Count == expectedValues.Count);

            //Verify each entry
            foreach (object regKeyName in contextMock.RegistryEntries.Keys)
            {
                Hashtable valDataActual, valDataExpected;
                Assert.IsNotNull(valDataActual = (Hashtable)(((RegistrationKeyMock)contextMock.RegistryEntries[regKeyName])).Keys);
                Assert.IsNotNull(valDataExpected = (Hashtable)expectedValues[regKeyName]);
                Assert.AreEqual(valDataExpected.Count, valDataActual.Count);
                foreach (object valueName in valDataActual.Keys)
                    Assert.IsTrue(string.Compare(valDataActual[valueName.ToString()].ToString(), valDataExpected[valueName.ToString()].ToString(), true) == 0);
            }
        }