use component_model ::ComponentModel;
use component_model_types ::Assign;
#[ derive( Default, ComponentModel ) ]
struct MinimalConfig
{
host: String,
enabled: bool,
}
#[ test ]
fn test_string_assignment_works()
{
let mut config = MinimalConfig ::default();
config.assign( "localhost".to_string() ); assert_eq!( config.host, "localhost" );
}
#[ test ]
fn test_explicit_bool_assignment_works()
{
let mut config = MinimalConfig ::default();
Assign :: < bool, bool > ::assign( &mut config, true );
assert!( config.enabled );
}