コード例 #1
0
        public void TestInitConstructor()
        {
            //arrange
            var firstPeople  = new Person(123L, "first");
            var secondPeople = new Person(234L, "second");
            var thirdPeople  = new Person(12598L, "third");
            var allPeople    = new IPerson[] { firstPeople, secondPeople, thirdPeople };

            //act
            this.database = new ExDatabase(allPeople);

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