public void InsertBeforeFirstWorks()
        {
            ModelUIPartList partList = new ModelUIPartList();

            partList.AppendPart(new DummyPart("2"));
            partList.AppendPart(new DummyPart("3"));
            partList.AppendPart(new DummyPart("4"));

            partList.InsertPartBefore("2", new DummyPart("1"));

            AssertSequentialPartList(partList, 4);
        }
        public void InsertAfterNotFoundDoesNothingAndThrows()
        {
            ModelUIPartList partList = new ModelUIPartList();

            partList.AppendPart(new DummyPart("1"));
            partList.AppendPart(new DummyPart("2"));
            partList.AppendPart(new DummyPart("3"));

            Assert.Throws <ArgumentOutOfRangeException>(
                () => partList.InsertPartBefore("not found", new DummyPart("5"))
                );

            AssertSequentialPartList(partList, 3);
        }