Пример #1
0
        public void RegistryTestExists(string key, string parameter, bool expected)
        {
            var reg = new RegistryCurrentUser(key);
            var res = reg.Exist(parameter);

            Assert.That(res, Is.EqualTo(expected));
        }
Пример #2
0
        public void ReadRegistryWithNoData()
        {
            var reg = new RegistryCurrentUser("UseDuringTest");
            var wr  = reg.Read <int>("SomeThingNotExisting");

            Assert.That(wr, Is.EqualTo(default(int)));
        }
Пример #3
0
        public void RegistryTestWriteReadSimpleTypes <T>(T data, T expected)
        {
            var reg = new RegistryCurrentUser("UseDuringTest");

            reg.Write("SomeData", data);

            var wr = reg.Read <T>("SomeData");

            Assert.That(wr, Is.EqualTo(expected));
        }
Пример #4
0
        public void RegistryTestDoesExist()
        {
            var reg = new RegistryCurrentUser("UseDuringTest");

            Assert.That(reg, Is.Not.Null);
        }