Additional tests for configuration

This commit is contained in:
John Doty 2024-08-08 10:26:36 -07:00
parent e1768a0433
commit 6736cdd431
2 changed files with 59 additions and 0 deletions

View file

@ -20,6 +20,11 @@ impl ServerConfig {
ServerConfig { auto: true, ports: HashMap::new() }
}
#[cfg(test)]
pub fn insert(&mut self, port: u16, config: PortConfig) {
self.ports.insert(port, config);
}
pub fn contains_key(&self, port: u16) -> bool {
self.ports.contains_key(&port)
}