Skip to content

Commit

Permalink
Merge pull request #225 from rruckley/bug-tmf633-classpath-220
Browse files Browse the repository at this point in the history
Bug: Fix CLASS_PATH, add unit test.
  • Loading branch information
rruckley authored Jan 22, 2025
2 parents a060b18 + 8413e6e commit 7f595d4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/tmf633/service_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::service_category::ServiceCategoryRef;
use tmflib_derive::{HasId, HasLastUpdate, HasDescription, HasName, HasValidity};

use super::MOD_PATH;
const CLASS_PATH : &str = "serviceCategory";
const CLASS_PATH : &str = "serviceCatalog";
const CAT_STATUS_NEW : &str = "new";
const CAT_VERS_NEW : &str = "1.0";

Expand Down Expand Up @@ -111,4 +111,14 @@ mod test {
assert_eq!(catalog.description.is_some(),true);
assert_eq!(catalog.description.unwrap(),CAT_DESC.to_string());
}

#[test]
fn test_servicecatalog_classpath() {

let path = ServiceCatalog::get_class();

assert_eq!(path,CLASS_PATH.to_string());
// This feels silly but we should test since it was a bug
assert_eq!(path.contains("Catalog"),true);
}
}

0 comments on commit 7f595d4

Please sign in to comment.