示例#1
0
        public void TryGetValueTest()
        {
            var person = new Person();
            var result = _stdCollection.TryGetValue(_person1.Id, _person1.Notes, ref person);

            Assert.IsTrue(result);
            Assert.AreEqual(person, _person1);
        }
示例#2
0
        public void TryGetValue_by_name_Test()
        {
            // Arrange
            var name1 = new NameKey(_nameKey1.Name);
            // Action
            Person actualPerson = new Person();
            var    isSuccess    = _userTypeCollection.TryGetValue(name1, ref actualPerson);

            // Assert
            Assert.IsTrue(isSuccess);
            Assert.AreEqual(_personUt1, actualPerson);
        }