コード例 #1
0
        public void Setup()
        {
            this.person = new Person(1, "Ivan");

            Person[] personsData = new Person[]
            {
                new Person(1, "Ivan1"),
                new Person(2, "Ivan2"),
                new Person(3, "Ivan3"),
                new Person(4, "Ivan4"),
                new Person(5, "Ivan5"),
                new Person(6, "Ivan6"),
                new Person(7, "Ivan7"),
                new Person(8, "Ivan8"),
                new Person(9, "Ivan9"),
                new Person(10, "Ivan10"),
                new Person(11, "Ivan11"),
                new Person(12, "Ivan12"),
                new Person(13, "Ivan13"),
                new Person(14, "Ivan14"),
                new Person(15, "Ivan15"),
            };

            this.database = new ExtendedDatabase(personsData);
        }
コード例 #2
0
        public void RemoveShouldThrowExceptionWhenCountZero()
        {
            ExtendedDatabase data = new ExtendedDatabase(initialData);

            data.Remove();
            data.Remove();

            Assert.Throws <InvalidOperationException>(() =>
            {
                data.Remove();
            });
        }