public void Set_Model_SetCorrectly() { // Assign var model = new TestModel { CreationTime = new DateTime(2014, 10, 5), Name = "Foo", EMail = "*****@*****.**", ID = 5 }; // Act _template.Model(model).With(x => x.CreationTime, x => x.ToString("dd.MM.yyyy")).Set(); // Assert Assert.AreEqual("5 Foo [email protected] 05.10.2014", _template.Get()); }
public void Set_EverythingIsNull_SetCorrectly() { // Assign _template = Template.FromString("{Model.ID} {Model.Name} {Model.EMail}"); var model = new TestModel(); // Act _template.Model(model).Set(); // Assert Assert.AreEqual(" ", _template.Get()); }