Ejemplo n.º 1
0
        public void ShouldReturnSameReferenceWhenConvertingImmutableSetMutliDictionaryToImmutalbe()
        {
            // given
            var multiDictionary = ImmutableSetMultiDictionary <int, string> .Of(1, "A", 2, "B");

            // when
            var converted = multiDictionary.ToImmutableMultiDictionary();

            // then
            Check.That(converted).IsSameReferenceThan(multiDictionary);
        }
Ejemplo n.º 2
0
        public void ShouldExntedReadOnlyDictionaryByToImmutableSetMultiDictionaryMethod()
        {
            // given
            var dictionary = Dictionaries.CreateImmutable("A", "A1", "B", "B1", "C", "C1");

            // when
            var multiDictionary = dictionary.ToImmutableSetMultiDictionary();

            // then
            Check.That(multiDictionary)
            .IsEqualTo(ImmutableSetMultiDictionary <string, string> .Of("A", "A1", "B", "B1", "C", "C1"));
        }