Created
July 29, 2015 06:18
This file contains hidden or 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