Struct umm::grade::UnitTestGrader
source · pub struct UnitTestGrader {
pub req_name: String,
pub out_of: f64,
pub target_test: Array,
pub target_class: Array,
pub excluded_methods: Array,
pub avoid_calls_to: Array,
}
Expand description
Runs mutation tests using to grade unit tests written by students.
Fields§
§req_name: String
Name of the requirement.
out_of: f64
Maximum possible grade.
target_test: Array
List of test classes to run.
target_class: Array
List of classes to mutate.
excluded_methods: Array
List of methods to exclude from mutation.
avoid_calls_to: Array
List of classes to avoid mutating.
Implementations§
source§impl UnitTestGrader
impl UnitTestGrader
sourcepub fn get_req_name(&mut self) -> String
pub fn get_req_name(&mut self) -> String
A getter for the name of the requirement.
sourcepub fn get_out_of(&mut self) -> f64
pub fn get_out_of(&mut self) -> f64
A getter for the maximum possible grade.
sourcepub fn get_target_test(&mut self) -> Array
pub fn get_target_test(&mut self) -> Array
A getter for the list of test classes to run.
sourcepub fn get_target_class(&mut self) -> Array
pub fn get_target_class(&mut self) -> Array
A getter for the list of classes to mutate.
sourcepub fn get_excluded_methods(&mut self) -> Array
pub fn get_excluded_methods(&mut self) -> Array
A getter for the list of methods to exclude from mutation.
sourcepub fn get_avoid_calls_to(&mut self) -> Array
pub fn get_avoid_calls_to(&mut self) -> Array
A getter for the list of classes to avoid mutating.
sourcepub fn set_req_name(self, req_name: String) -> Self
pub fn set_req_name(self, req_name: String) -> Self
A setter for the name of the requirement.
sourcepub fn set_out_of(self, out_of: f64) -> Self
pub fn set_out_of(self, out_of: f64) -> Self
A setter for the maximum possible grade.
sourcepub fn set_target_test(self, target_test: Array) -> Self
pub fn set_target_test(self, target_test: Array) -> Self
A setter for the list of test classes to run.
sourcepub fn set_target_class(self, target_class: Array) -> Self
pub fn set_target_class(self, target_class: Array) -> Self
A setter for the list of classes to mutate.
sourcepub fn set_excluded_methods(self, excluded_methods: Array) -> Self
pub fn set_excluded_methods(self, excluded_methods: Array) -> Self
A setter for the list of methods to exclude from mutation.
sourcepub fn set_avoid_calls_to(self, avoid_calls_to: Array) -> Self
pub fn set_avoid_calls_to(self, avoid_calls_to: Array) -> Self
A setter for the list of classes to avoid mutating.
sourcepub fn grade_unit_tests(&mut self) -> Result<GradeResult>
pub fn grade_unit_tests(&mut self) -> Result<GradeResult>
Runs mutation tests using to grade unit tests written by students.
sourcepub fn grade_unit_tests_script(
&mut self
) -> Result<GradeResult, Box<EvalAltResult>>
pub fn grade_unit_tests_script( &mut self ) -> Result<GradeResult, Box<EvalAltResult>>
Macro generated variant of #fn_name that returns EvalAltResult. This allows the function to be used in scripts.
Trait Implementations§
source§impl Clone for UnitTestGrader
impl Clone for UnitTestGrader
source§fn clone(&self) -> UnitTestGrader
fn clone(&self) -> UnitTestGrader
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl CustomType for UnitTestGrader
impl CustomType for UnitTestGrader
Allows registering custom types with Rhai