1+ package com .fishercoder ;
2+
3+ import com .fishercoder .solutions ._2126 ;
4+ import org .junit .BeforeClass ;
5+ import org .junit .Test ;
6+
7+ import static org .junit .Assert .assertEquals ;
8+
9+ public class _2126Test {
10+ private static _2126 .Solution1 solution1 ;
11+ private static int []asteroids ;
12+ private static int mass ;
13+ private boolean expected ;
14+
15+ @ BeforeClass
16+ public static void setup () {
17+ solution1 =new _2126 .Solution1 ();
18+ }
19+
20+ @ Test
21+ public void test1 () {
22+ asteroids =new int []{3 ,9 ,19 ,5 ,21 };
23+ mass =10 ;
24+ expected =true ;
25+ assertEquals (expected ,solution1 .asteroidsDestroyed (mass ,asteroids ));
26+ }
27+
28+ @ Test
29+ public void test2 () {
30+ asteroids =new int []{4 ,9 ,23 ,4 };
31+ mass =5 ;
32+ expected =false ;
33+ assertEquals (expected ,solution1 .asteroidsDestroyed (mass ,asteroids ));
34+ }
35+
36+ @ Test
37+ public void test3 () {
38+ asteroids =new int []{156 ,197 ,192 ,14 ,97 ,160 ,14 ,5 };
39+ mass =86 ;
40+ expected =true ;
41+ assertEquals (expected ,solution1 .asteroidsDestroyed (mass ,asteroids ));
42+ }
43+
44+ }