Exemple #1
0
        public void IndexInsertItemToReadOnlyFail()
        {
            UnitTestContext  context = GetContext();
            MockReadOnlyList list    = new MockReadOnlyList(new MockReadOnly());

            context.Assert.Try(() => list[0] = new MockReadOnly());
            context.Complete();
        }
Exemple #2
0
        public void ClearReadOnlyFail()
        {
            UnitTestContext  context = GetContext();
            MockReadOnlyList list    = new MockReadOnlyList();

            context.Assert.Try(() => list.Clear());
            context.Complete();
        }
Exemple #3
0
        public void AddItemToReadOnlyFail()
        {
            UnitTestContext  context = GetContext();
            MockReadOnlyList list    = new MockReadOnlyList();
            MockReadOnly     mock    = new MockReadOnly();

            context.Assert.Try(() => list.Add(mock));
            context.Complete();
        }