コード例 #1
0
        public void AddNullBabyToBabyListShouldThrowArgumentNullException()
        {
            Baby b = null;

            BabyList babies = new BabyList();

            babies.AddBaby(b);
        }
コード例 #2
0
        public void AddBabyUpdatesList()
        {
            DateTime endDate   = new DateTime(2017, 9, 19);
            DateTime startDate = new DateTime(2016, 10, 19);
            Baby     b         = new Baby(5, "joe", "bloggs", startDate, endDate, "main street", "001243235", "ann bloggs");
            BabyList babyList  = new BabyList();

            babyList.AddBaby(b);
            CollectionAssert.Contains(babyList.Babies, b);
        }