Exemple #1
0
        public void Merge_Properties()
        {
            // arrange
            var dir = new DirectoryEx(".\\Sample");
            var sut = new Meta()
            {
                Properties = new Dictionary <string, object>
                {
                    { "a", "A" },
                    { "b", "B" },
                    { "c", "C" },
                }
            };

            var meta2 = new Meta()
            {
                Properties = new Dictionary <string, object>
                {
                    { "a", "X" },
                    { "d", "D" },
                }
            };
            // act
            var result = sut.Merge(meta2, dir.GetDirectory("PZ Solutions"));

            // assert
            result.Should().NotBeNull();
            result.Properties["a"].Should().Be("X");
            result.Properties["b"].Should().Be("B");
            result.Properties["c"].Should().Be("C");
            result.Properties["d"].Should().Be("D");
        }