Created
July 1, 2017 16:11
-
-
Save marzoukali/8c1d6b0eb59061ab4cb127ec6e37b6cb to your computer and use it in GitHub Desktop.
unittest-example-1
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 PrintInvoiceCommand | |
{ | |
public void Execute(int invoiceId) | |
{ | |
var database = new Database(); | |
var invoice = database.GetInvoice(invoiceId); | |
Printer.WriteLine("Invoice ID: " + invoice.Id); | |
Printer.WriteLine("Total: $" + invoice.Total); | |
var dateTime = DateTime.Now; | |
Printer.WriteLine("Printed: " + dateTime.ToShortDateString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment