Ejemplo n.º 1
0
        public void Verify_replace_helper_works_with_unique_ids()
        {
            var rm1 = new ReadModelTest("test1", 42);
            var rm2 = new ReadModelTest("test2", 42);

            List <ReadModelTest> sut = new List <ReadModelTest>();

            sut.AddOrReplace(rm1);
            sut.AddOrReplace(rm2);

            Assert.That(sut.Count, Is.EqualTo(2));
        }
Ejemplo n.º 2
0
        public void Verify_replace_helper_dischard_duplicates()
        {
            var rm1 = new ReadModelTest("test1", 42);
            var rm2 = new ReadModelTest("test1", 42);

            List <ReadModelTest> sut = new List <ReadModelTest>();

            sut.AddOrReplace(rm1);
            sut.AddOrReplace(rm2);

            Assert.That(sut.Count, Is.EqualTo(1));
        }