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); }
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); }
public void Room_name_cannot_be_empty_test() { var room = new Room(); Assert.IsNotNull(room.Name); }
public void Name_propertie_cannot_be_set_to_null_test() { Room room = new Room(); room.Name = null; }