Beispiel #1
0
        public void GetNotExisting(string name)
        {
            var svc = new LocalStoredSVC();

            svc.StartModule();

            Assert.Throws <KeyNotFoundException>(() => svc.Get <int>(name));
        }
Beispiel #2
0
        public void SetAndGetInt(string name, int value)
        {
            var svc = new LocalStoredSVC();

            svc.StartModule();

            svc.Set(name, value);
            Assert.Equal(value, svc.Get <int>(name));
        }
Beispiel #3
0
        public void SetAndChange(string name, int value)
        {
            var svc = new LocalStoredSVC();

            svc.StartModule();

            var newValue = value + 5;

            svc.Set(name, value);
            svc.Set(name, newValue);
            Assert.Equal(newValue, svc.Get <int>(name));
        }