public void Clear_EmptyCollection()
 {
     ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection();
     Assert.Equal(0, items.Count);
     Assert.Equal(0, items.GetDeletedKeys().Count);
     Assert.Equal(0, items.GetModifiedKeys().Count);
     items.Clear();
     Assert.Equal(0, items.Count);
     Assert.Equal(0, items.GetDeletedKeys().Count);
     Assert.Equal(0, items.GetModifiedKeys().Count);
 }
Ejemplo n.º 2
0
        public void Clear_EmptyCollection()
        {
            ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection();

            Assert.Equal(0, items.Count);
            Assert.Equal(0, items.GetDeletedKeys().Count);
            Assert.Equal(0, items.GetModifiedKeys().Count);
            items.Clear();
            Assert.Equal(0, items.Count);
            Assert.Equal(0, items.GetDeletedKeys().Count);
            Assert.Equal(0, items.GetModifiedKeys().Count);
        }
Ejemplo n.º 3
0
        public void Clear_EmptyCollection()
        {
            ChangeTrackingSessionStateItemCollection items = Utility.GetChangeTrackingSessionStateItemCollection();

            Assert.Empty(items);
            Assert.Empty(items.GetDeletedKeys());
            Assert.Empty(items.GetModifiedKeys());
            items.Clear();
            Assert.Empty(items);
            Assert.Empty(items.GetDeletedKeys());
            Assert.Empty(items.GetModifiedKeys());
        }
 public void Clear_Successful()
 {
     ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection();
     items["key1"] = "value1";
     items["key2"] = "value2";
     items["key3"] = "value3";
     Assert.Equal(3, items.Count);
     Assert.Equal(0, items.GetDeletedKeys().Count);
     Assert.Equal(3, items.GetModifiedKeys().Count);
     items.Clear();
     Assert.Equal(0, items.Count);
     Assert.Equal(3, items.GetDeletedKeys().Count);
     Assert.Equal(0, items.GetModifiedKeys().Count);
 }
Ejemplo n.º 5
0
        public void Clear_Successful()
        {
            ChangeTrackingSessionStateItemCollection items = new ChangeTrackingSessionStateItemCollection();

            items["key1"] = "value1";
            items["key2"] = "value2";
            items["key3"] = "value3";
            Assert.Equal(3, items.Count);
            Assert.Equal(0, items.GetDeletedKeys().Count);
            Assert.Equal(3, items.GetModifiedKeys().Count);
            items.Clear();
            Assert.Equal(0, items.Count);
            Assert.Equal(3, items.GetDeletedKeys().Count);
            Assert.Equal(0, items.GetModifiedKeys().Count);
        }