/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.edu.amu.wmi.dino.ultrapotegowanie;

import java.util.Random;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author bikol
 */
public class UltraPotegowanieTest {
    
    public UltraPotegowanieTest() {
    }

    // Patryk Zywica
    @Test
    public void testPoteguj() {
        assertEquals("1", UltraPotegowanie.poteguj("1", "1"));
    }
    @Test
    public void testPoteguj2() {
        assertEquals("2", UltraPotegowanie.poteguj("2", "1"));
    }
    @Test
    public void testPoteguj3() {
        Random r = new Random();
        for(int i=0;i<1000;i++){
            int liczba = r.nextInt();
            assertEquals("1", UltraPotegowanie.poteguj(Integer.toString(liczba), "0"));
            
        }
    }
    /////////
    
    // Helena Galazka
    @Test
    public void testPoteguj4() {
        assertEquals("1.5", UltraPotegowanie.poteguj("1.5", "1"));
    }
    
    @Test
     public void testPoteguj5() {
        assertEquals("2.25", UltraPotegowanie.poteguj("1.5", "2"));
    }
     
    @Test
     public void testPoteguj6() {
        assertEquals("0.5", UltraPotegowanie.poteguj("2", "-1"));
    }
     
    /////////

    // Nikodem Pachala
     @Test
     public void testPoteguj20(){
         assertEquals("10000000000", UltraPotegowanie.poteguj("10", "10"));
     }
     
     @Test
     public void testPoteguj21(){
          assertEquals("1", UltraPotegowanie.poteguj("0", "0"));
     }
     
     @Test
     public void testPoteguj22(){
          assertEquals("-1", UltraPotegowanie.poteguj("-1", "-1")); 
     }


    // Mikolaj Szumigalski testy dla dużych liczb i dla 0
     @Test
    public void testPotegujSzumi1() {
        assertEquals("1000000000000", UltraPotegowanie.poteguj("1000000", "2"));
    }

     @Test
    public void testPotegujSzumi2() {
        assertEquals("0.000000000001", UltraPotegowanie.poteguj("1000000", "-2"));
    }
     
    @Test
    public void testPotegujSzumi3() {
        assertEquals("0", UltraPotegowanie.poteguj("0", "1000"));
    }
    //Diana Orłowska
    @Test
    public void testNotacjaNaukowa(){
        assertEquals("27000000000",UltraPotegowanie.poteguj("0.3e4","3"));
    }
    
    @Test
    public void testNotacjaNaukowa2(){
        assertEquals("0.00000025",UltraPotegowanie.poteguj("2e3","-2"));
    }
    
    @Test
    public void testUlamki(){
        assertEquals("4",UltraPotegowanie.poteguj("256","0.25"));
    }
    }
    
    
    
}


@@ -2666,17 +2666,23 @@
 Equals(%22
-4
+0.44721
 %22,UltraP
@@ -2705,17 +2705,16 @@
 uj(%22
-256
+0.2
 %22,%220.
-2
 5%22))

Update UltraPotegowanieTest.java