Additional tests for configuration
This commit is contained in:
parent
e1768a0433
commit
6736cdd431
2 changed files with 59 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue