Last active
August 29, 2015 14:04
-
-
Save marcioalthmann/8c2855fb87802f7db14f to your computer and use it in GitHub Desktop.
Objeto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Objeto | |
{ | |
public int PrimeiroValor { get;set;} | |
public int SegundoValor { get;set;} | |
} | |
[TestFixture ()] | |
public class Test | |
{ | |
[Test ()] | |
public void Somando_uma_propriedade () | |
{ | |
var lista = new List<Objeto> (); | |
lista.Add (new Objeto{ PrimeiroValor = 10, SegundoValor = 20 }); | |
lista.Add (new Objeto{ PrimeiroValor = 30, SegundoValor = 40 }); | |
Assert.AreEqual (40, lista.Sum (x => x.PrimeiroValor)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment