コード例 #1
0
        public void TrackInstanceModifications()
        {
            var resource = new TestResource()
            {
                Foo = "xyz",
            };

            resource.GetData().Keys.Should().BeEquivalentTo("foo");

            resource.Bar = true;

            resource.GetData().Count.Should().Be(2);
            resource.GetData().Should().Contain(new KeyValuePair <string, object>("foo", "xyz"));
            resource.GetData().Should().Contain(new KeyValuePair <string, object>("bar", true));
        }