Created
July 29, 2015 06:18
-
-
Save mafis/9bd71e2915502f9a5cad to your computer and use it in GitHub Desktop.
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 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