コード例 #1
0
        public void DatabaseInitializationConstructorWithCollectionOfPeople()
        {
            var firstPerson        = new Person(123, "First");
            var secondPerson       = new Person(345, "Second");
            var collectionOfPeople = new IPerson[] { firstPerson, secondPerson };

            this.database = new DatabasePeople(collectionOfPeople);

            Assert.AreEqual(2, this.database.Count, $"Constructor doesn't work with {typeof(IPerson)} as parameter");
        }
コード例 #2
0
 public void DatabaseInitializeConstructorWithNullLeadsToEmptyDB()
 {
     Assert.DoesNotThrow(() => this.database = new DatabasePeople(null));
 }
コード例 #3
0
 public void TestInitialization()
 {
     this.database = new DatabasePeople();
 }