Exemple #1
0
 public void Properties_are_set_on_create_test()
 {
     Room room = new Room() { Id = 1, Name = "School1", Capacity = 5 };
     Assert.AreEqual(room.Id, 1);
     Assert.AreEqual(room.Name, "School1");
     Assert.AreEqual(room.Capacity, 5);
 }
Exemple #2
0
        public void School_properties_are_set_on_create_test()
        {
            var room = new Room() { Id = 1 };
            var createdDate = DateTime.Now;
            School school = new School()
            {
                CreatedDate = createdDate,
                Rooms = new List<Room>() { room },
                Name = "TheSchool",
                Id = 1
            };

            Assert.AreEqual(school.Id, 1);
            Assert.AreEqual(school.Name, "TheSchool");
            Assert.AreEqual(school.Rooms.Count, 1);
            Assert.AreEqual(school.Rooms[0], room);
            Assert.AreEqual(school.CreatedDate, createdDate);
        }
Exemple #3
0
 public void Room_name_cannot_be_empty_test()
 {
     var room = new Room();
     Assert.IsNotNull(room.Name);
 }
Exemple #4
0
 public void Name_propertie_cannot_be_set_to_null_test()
 {
     Room room = new Room();
     room.Name = null;
 }