public void TestDeTokenizeString() { string Input = "{application:name} is being tested on @TweetHarbor 'cause it rocks the {build:commit:id} magic {build:commit:message}"; Notification n = new Notification() { application = new Application() { name = "TestApp", }, build = new Build() { BuildId = 10, commit = new Commit() { id = Guid.NewGuid().ToString(), message = "Some testin' goin' on" }, status = "succeeded" } }; Project p = new Project() { DateCreated = DateTime.Now.AddDays(-1), ProjectName = "TestApp" }; var result = NotifyController.DeTokenizeString(Input, p, n); Assert.AreEqual("TestApp is being tested on @TweetHarbor 'cause it rocks the " + n.build.commit.id.Substring(0, 7) + " magic Some testin' goin' on", result); }