示例#1
0
            public void ReturnsDefaultFromInvalidKey()
            {
                var observableDictionary = new FastObservableDictionary <int, int>
                {
                    {
                        1, 1
                    }
                };

                var success = observableDictionary.TryGetValue(2, out int value);

                Assert.IsTrue(!success && value == 0);
            }
示例#2
0
            public void ReturnsValueFromValidKey()
            {
                var observableDictionary = new FastObservableDictionary <int, int>
                {
                    {
                        1, 1
                    }
                };

                var success = observableDictionary.TryGetValue(1, out int value);

                Assert.IsTrue(success && value == 1);
            }