Skip to content

Instantly share code, notes, and snippets.

@mafis
Created July 29, 2015 06:18
Show Gist options
  • Save mafis/9bd71e2915502f9a5cad to your computer and use it in GitHub Desktop.
Save mafis/9bd71e2915502f9a5cad to your computer and use it in GitHub Desktop.
public class Klient
{
public string Vorname {
get;
set;
}
public string Nachname {
get;
set;
}
}
public class FullnameConverter
{
public string ConvertToFullname(Klient klient)
{
return klient.Vorname + " " + klient.Nachname;
}
}
[TestFixture]
public class KlientTest
{
[Test]
public void Fullname()
{
string expected = "Max Mustermann";
Klient klient = new Klient () {
Vorname = "Max",
Nachname = "Mustermann"
};
FullnameConverter converter = new FullnameConverter ();
Assert.AreEqual (expected,converter.ConvertToFullname(klient));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment