File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed 
src/test/java/com/thealgorithms/maths Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ package  com .thealgorithms .maths ;
2+ 
3+ import  org .junit .jupiter .api .Test ;
4+ import  static  org .junit .jupiter .api .Assertions .*;
5+ 
6+ 
7+ public  class  PerfectSquareTest {
8+ 	
9+ 	@ Test 
10+ 	public  void  TestPerfectSquareifiscorrect (){
11+ 		//Valid Partition 
12+ 		int  number  = 9 ;
13+ 		
14+ 		boolean  result  = PerfectSquare .isPerfectSquare (number );
15+ 		
16+ 		assertTrue (result );
17+ 	}
18+ 	
19+ 	@ Test 
20+ 	public  void  TestPerfectSquareifisnotcorrect (){
21+ 		//Invalid Partition 1 
22+ 		int  number  = 3 ;
23+ 		
24+ 		boolean  result  = PerfectSquare .isPerfectSquare (number );
25+ 		
26+ 		assertFalse (result );
27+ 	}
28+ 	@ Test 
29+ 	public  void  TestPerfectSquareifisNegativeNumber (){
30+ 		//Invalid Partition 2 
31+ 		int  number  = -10 ;
32+ 
33+ 		boolean  result  = PerfectSquare .isPerfectSquare (number );
34+ 
35+ 		assertFalse (result );
36+ 	}
37+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments