feat(domain): restore must_use message; test TermRef accessors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -50,3 +50,18 @@ impl TermRef {
|
||||
self.vocabulary_id
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{TermId, VocabularyId};
|
||||
|
||||
#[test]
|
||||
fn term_ref_exposes_its_parts() {
|
||||
let term_id = TermId::new();
|
||||
let vocabulary_id = VocabularyId::new();
|
||||
let r = TermRef::new(term_id, vocabulary_id);
|
||||
assert_eq!(r.term_id(), term_id);
|
||||
assert_eq!(r.vocabulary_id(), vocabulary_id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user