Pruebas Naturales



using Calculadora;
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject1
{
[TestClass()]

public class NaturalTest
{
private TestContext testContextInstance;
public TestContext TestContext
{ get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
#region Atributos de prueba adicionales
#endregion
[TestMethod()]
public void NaturalConstructorTest()
{

Natural target = new Natural();
Assert.Inconclusive("TODO: Implementar código para comprobar el destino");
}
[TestMethod()]
///[ExpectedException(typeof(SystemException))]
///En esta parte nos servira para realizar las excepciones del programa
public void SumarTest()
{
int a = 4;
int b = 2;
int expected = 6; // TODO: Inicializar en un valor adecuado
int actual;
actual = Natural.Sumar(x, y);
Assert.AreEqual(expected, actual);
}
[TestMethod()]
[ExpectedException(typeof(IndexOutOfRangeException))]
public void SumaNaturalTest()
{
int x = 4;
int y = -2;
Natural.Sumar(x, y);
}
}
}

No hay comentarios.:

Publicar un comentario

Gracias por participar en esta página