Melissa Cambre Paulin y Erick ballesteros Moguel
RAIZ CUADRADA
import calculadora.Raiz;
import org.junit.*;
import static org.junit.Assert.*;
/**
*
* @Melissa Cambre y Erick Ballesteros
*/
public class Raiztest {
static Raiz ra;
public Raiztest() {
import org.junit.*;
import static org.junit.Assert.*;
/**
*
* @Melissa Cambre y Erick Ballesteros
*/
public class Raiztest {
static Raiz ra;
public Raiztest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
ra = new Raiz(25);
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test
public void Multiplicacion() {
assertEquals(ra.Realizar(), 5, 0);
}
}
RESTA
import calculadora.Resta;
import org.junit.*;
import static org.junit.Assert.*;
/**
*
* @Melissa Cambre y Erick Ballesteros
*/
public class Restatest {
static Resta restar;
public Restatest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
restar = new Resta(8, 1);
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test
public void Resta() {
assertEquals(restar.Restar(), 7, 0);
}
}
SUMA
import calculadora.Suma;
import org.junit.*;
import static org.junit.Assert.*;
public class SumaTest {
static Suma sum;
public SumaTest() {
}
@BeforeClass public static void setUpClass() throws Exception {
sum = new Suma(8,1);
}
@AfterClass public static void tearDownClass() throws Exception { }
@Before public void setUp() { }
@After public void tearDown() {
}
@Test public void Suma(){
assertEquals(sum.Sumar(),9,0);
import org.junit.*;
import static org.junit.Assert.*;
public class SumaTest {
static Suma sum;
public SumaTest() {
}
@BeforeClass public static void setUpClass() throws Exception {
sum = new Suma(8,1);
}
@AfterClass public static void tearDownClass() throws Exception { }
@Before public void setUp() { }
@After public void tearDown() {
}
@Test public void Suma(){
assertEquals(sum.Sumar(),9,0);
DIVISION
import calculadora.Division;
import org.junit.*;
import static org.junit.Assert.*;
public class DividirTest {
static Division div;
public DividirTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
div = new Division(8, 1);
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test
public void Multiplicacion() {
assertEquals(div.Dividir(), 8, 0);
}
}
MULTIPLICACION
import calculadora.Multiplicacion;
import org.junit.*;
import static org.junit.Assert.*;
/**
*
* @Melissa Cambre y Erick Ballesteros
*/
public class MultiplicacionTest {
static Multiplicacion mul;
public MultiplicacionTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
mul = new Multiplicacion(8, 1);
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test
public void Multiplicacion() {
assertEquals(mul.Multiplicacion(), 8, 0);
}
}
No hay comentarios:
Publicar un comentario