homework: upgrade power socket

This commit is contained in:
6 changed files with 137 additions and 28 deletions

View File

@@ -62,8 +62,8 @@ mod tests {
Room::new(
[
("ThermA".to_string(), Thermometer::new(20.0).into()),
("PSocA".to_string(), PowerSocket::new(12.34, false).into()),
("PSocB".to_string(), PowerSocket::new(10.01, true).into()),
("PSocA".to_string(), PowerSocket::stub(12.34, false).into()),
("PSocB".to_string(), PowerSocket::stub(10.01, true).into()),
]
.into_iter()
.collect(),
@@ -73,7 +73,7 @@ mod tests {
"bedroom".to_string(),
Room::new(
[
("PSocC".to_string(), PowerSocket::new(11.11, true).into()),
("PSocC".to_string(), PowerSocket::stub(11.11, true).into()),
("ThermB".to_string(), Thermometer::new(17.99).into()),
]
.into_iter()