Skip to content

Instantly share code, notes, and snippets.

@yngwie74 yngwie74/LCDTest.cs
Created Mar 12, 2012

Embed
What would you like to do?
LCD numbers' tests (C#)
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ViveCodigo.Katas.LCD.Test
{
/// <summary>
///This is a test class for LCDTest and is intended to contain all its Unit Tests.
///</summary>
[TestClass]
public class LCDTest
{
[TestMethod]
public void Convierte1()
{
Assert.AreEqual(
" \n" +
" |\n" +
" |", LCD.ToLCD(1));
}
[TestMethod]
public void Convierte2()
{
Assert.AreEqual(
" _ \n" +
" _|\n" +
"|_ ", LCD.ToLCD(2));
}
[TestMethod]
public void Convierte3()
{
Assert.AreEqual(
" _ \n" +
" _|\n" +
" _|", LCD.ToLCD(3));
}
[TestMethod]
public void Convierte4()
{
Assert.AreEqual(
" \n" +
"|_|\n" +
" |", LCD.ToLCD(4));
}
[TestMethod]
public void Convierte5()
{
Assert.AreEqual(
" _ \n" +
"|_ \n" +
" _|", LCD.ToLCD(5));
}
[TestMethod]
public void Convierte6()
{
Assert.AreEqual(
" _ \n" +
"|_ \n" +
"|_|", LCD.ToLCD(6));
}
[TestMethod]
public void Convierte7()
{
Assert.AreEqual(
" _ \n" +
" |\n" +
" |", LCD.ToLCD(7));
}
[TestMethod]
public void Convierte8()
{
Assert.AreEqual(
" _ \n" +
"|_|\n" +
"|_|", LCD.ToLCD(8));
}
[TestMethod]
public void Convierte9()
{
Assert.AreEqual(
" _ \n" +
"|_|\n" +
" _|", LCD.ToLCD(9));
}
[TestMethod]
public void Convierte0()
{
Assert.AreEqual(
" _ \n" +
"| |\n" +
"|_|", LCD.ToLCD(0));
}
[TestMethod]
public void Convierte10()
{
Assert.AreEqual(
" _ \n" +
" || |\n" +
" ||_|", LCD.ToLCD(10));
}
[TestMethod]
public void Convierte396()
{
Assert.AreEqual(
" _ _ _ \n" +
" _||_||_ \n" +
" _| _||_|", LCD.ToLCD(396));
}
[TestMethod]
public void Convierte5201()
{
Assert.AreEqual(
" _ _ _ \n" +
"|_ _|| | |\n" +
" _||_ |_| |", LCD.ToLCD(5201));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.