()
| 42 | |
| 43 | #[test] |
| 44 | fn create_close_open_close() { |
| 45 | let _session = Session::new().expect("Failed to initialize session"); |
| 46 | let project_name = "create_close_open_close"; |
| 47 | let project_path = unique_project(project_name); |
| 48 | // create the project |
| 49 | let project = Project::create(&project_path, project_name).expect("Failed to create project"); |
| 50 | project.open().unwrap(); |
| 51 | |
| 52 | // get the project id |
| 53 | let id = project.id(); |
| 54 | |
| 55 | // close the project |
| 56 | project.close().unwrap(); |
| 57 | drop(project); |
| 58 | |
| 59 | let project = Project::open_project(&project_path).expect("Failed to open project"); |
| 60 | // assert same id |
| 61 | let new_id = project.id(); |
| 62 | assert_eq!(id, new_id); |
| 63 | |
| 64 | // close the project |
| 65 | project.close().unwrap(); |
| 66 | drop(project); |
| 67 | |
| 68 | // delete the project |
| 69 | std::fs::remove_dir_all(project_path).unwrap(); |
| 70 | } |
| 71 | |
| 72 | #[test] |
| 73 | fn modify_project() { |
nothing calls this directly
no test coverage detected