11use approx:: assert_abs_diff_eq;
22use quantrs:: options:: {
3- BinomialTreeModel , BlackScholesModel , EuropeanOption , Greeks , Instrument , MonteCarloModel ,
4- Option , OptionGreeks , OptionPricing , OptionType ,
3+ AmericanOption , BinaryOption , BinomialTreeModel , BlackScholesModel , EuropeanOption , Greeks ,
4+ Instrument , MonteCarloModel , Option , OptionGreeks , OptionPricing , OptionType ,
55} ;
66
77// Function to assert that a type implements the Option trait
@@ -470,8 +470,6 @@ mod greeks_tests {
470470
471471// Option Trait Tests
472472mod option_trait_tests {
473- use quantrs:: options:: AmericanOption ;
474-
475473 use super :: * ;
476474
477475 #[ test]
@@ -484,6 +482,10 @@ mod option_trait_tests {
484482 assert_implements_option_trait ( & option) ;
485483 let option = AmericanOption :: new ( Instrument :: new ( 100.0 ) , 100.0 , OptionType :: Put ) ;
486484 assert_implements_option_trait ( & option) ;
485+ let option = BinaryOption :: new ( Instrument :: new ( 100.0 ) , 100.0 , OptionType :: Call ) ;
486+ assert_implements_option_trait ( & option) ;
487+ let option = BinaryOption :: new ( Instrument :: new ( 100.0 ) , 100.0 , OptionType :: Put ) ;
488+ assert_implements_option_trait ( & option) ;
487489
488490 let model = BlackScholesModel :: new ( 1.0 , 0.05 , 0.2 ) ;
489491 assert_implements_model_trait ( & model) ;
0 commit comments