Esempio n. 1
0
 public void MultipleSetsAccessSameMemeory()
 {
     var engine = new Engine();
     engine.Ints.Add(3);
     Assert.Equal(1, engine.Ints.Count());
     Assert.Equal(3, engine.Ints.Single());
     var engine2 = new Engine();
     Assert.Equal(1, engine2.Ints.Count());
     Assert.Equal(3, engine2.Ints.Single());
     engine.Ints.Add(6);
     Assert.Equal(2, engine.Ints.Count());
     Assert.Equal(6, engine.Ints.Last());
     Assert.Equal(2, engine2.Ints.Count());
     Assert.Equal(6, engine2.Ints.Last());
     var engine3 = new Engine2();
     Assert.Equal(2, engine3.Ints.Count());
     Assert.Equal(6, engine3.Ints.Last());
 }
Esempio n. 2
0
        public void MultipleSetsAccessSameMemeory()
        {
            var engine = new Engine();

            engine.Ints.Add(3);
            Assert.Equal(1, engine.Ints.Count());
            Assert.Equal(3, engine.Ints.Single());
            var engine2 = new Engine();

            Assert.Equal(1, engine2.Ints.Count());
            Assert.Equal(3, engine2.Ints.Single());
            engine.Ints.Add(6);
            Assert.Equal(2, engine.Ints.Count());
            Assert.Equal(6, engine.Ints.Last());
            Assert.Equal(2, engine2.Ints.Count());
            Assert.Equal(6, engine2.Ints.Last());
            var engine3 = new Engine2();

            Assert.Equal(2, engine3.Ints.Count());
            Assert.Equal(6, engine3.Ints.Last());
        }