Esempio n. 1
0
        public void AddSingleItemTwice_IsSetOnce()
        {
            var memory1 = "abc123".AsMemory();

            var hashSet = new CharMemoryHashSet();

            hashSet.Add(memory1);
            hashSet.Add(memory1);

            Assert.AreEqual(1, hashSet.Count);
        }
Esempio n. 2
0
        public void AddEquivilantButDifferentItems_IsSetOnce()
        {
            var memory1 = "abc123".AsMemory();
            var memory2 = "abc123".AsMemory();

            var hashSet = new CharMemoryHashSet();

            hashSet.Add(memory1);
            hashSet.Add(memory2);

            Assert.AreEqual(1, hashSet.Count);
        }
 /// <summary>
 /// Adds the field selection to this instance.
 /// </summary>
 /// <param name="newField">The new field.</param>
 public virtual void AddFieldSelection(FieldSelection newField)
 {
     _knownFieldAliases.Add(newField.Alias);
     _fields.Add(newField);
     newField.UpdatePath(this.RootPath);
 }