예제 #1
0
        public SingletonCache_Tests()
        {
            _singletonCache = new SingletonCache();

            _singletonCache.Add("TestKey1", "TestValue1");
            _singletonCache.Add("TestKey2", "TestValue2");
        }
예제 #2
0
        public void Should_Add_And_Get_Values()
        {
            _singletonCache.Add("MyNumber", 42);

            Assert.Equal(42, _singletonCache.GetOrNull("MyNumber"));
        }