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

            svc.StartModule();

            Assert.Throws <KeyNotFoundException>(() => svc.Get <int>(name));
        }
예제 #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));
        }
예제 #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));
        }