@@ -5,37 +5,39 @@ import Nimble
55final class EstimationFactorySpec : QuickSpec {
66 override func spec( ) {
77 describe ( " EstimationFactory " ) {
8+ let factory = EstimationFactory ( )
9+
810 describe ( " .create " ) {
911 it ( " creates QuadradicEstimator " ) {
10- expect ( EstimationFactory . create ( . quadradic) is QuadradicEstimator ) . to ( beTrue ( ) )
12+ expect ( factory . create ( . quadradic) is QuadradicEstimator ) . to ( beTrue ( ) )
1113 }
1214
1315 it ( " creates Barycentric " ) {
14- expect ( EstimationFactory . create ( . barycentric) is BarycentricEstimator ) . to ( beTrue ( ) )
16+ expect ( factory . create ( . barycentric) is BarycentricEstimator ) . to ( beTrue ( ) )
1517 }
1618
1719 it ( " creates QuinnsFirst " ) {
18- expect ( EstimationFactory . create ( . quinnsFirst) is QuinnsFirstEstimator ) . to ( beTrue ( ) )
20+ expect ( factory . create ( . quinnsFirst) is QuinnsFirstEstimator ) . to ( beTrue ( ) )
1921 }
2022
2123 it ( " creates QuinnsSecond " ) {
22- expect ( EstimationFactory . create ( . quinnsSecond) is QuinnsSecondEstimator ) . to ( beTrue ( ) )
24+ expect ( factory . create ( . quinnsSecond) is QuinnsSecondEstimator ) . to ( beTrue ( ) )
2325 }
2426
2527 it ( " creates Jains " ) {
26- expect ( EstimationFactory . create ( . jains) is JainsEstimator ) . to ( beTrue ( ) )
28+ expect ( factory . create ( . jains) is JainsEstimator ) . to ( beTrue ( ) )
2729 }
2830
2931 it ( " creates HPS " ) {
30- expect ( EstimationFactory . create ( . hps) is HPSEstimator ) . to ( beTrue ( ) )
32+ expect ( factory . create ( . hps) is HPSEstimator ) . to ( beTrue ( ) )
3133 }
3234
3335 it ( " creates YIN " ) {
34- expect ( EstimationFactory . create ( . yin) is YINEstimator ) . to ( beTrue ( ) )
36+ expect ( factory . create ( . yin) is YINEstimator ) . to ( beTrue ( ) )
3537 }
3638
3739 it ( " creates MaxValue " ) {
38- expect ( EstimationFactory . create ( . maxValue) is MaxValueEstimator ) . to ( beTrue ( ) )
40+ expect ( factory . create ( . maxValue) is MaxValueEstimator ) . to ( beTrue ( ) )
3941 }
4042 }
4143 }
0 commit comments