public void TestToString() { // Create a new Notification and use accessors to set the notification name var note = new Notification("TestNote", "1,3,5", "TestType"); const string ts = "Notification Name: TestNote\nBody:1,3,5\nType:TestType"; // test assertions Assert.IsTrue(note.ToString() == ts, "Expecting note.TestToString() == '" + ts + "'"); }
static int ToString(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); PureMVC.Patterns.Observer.Notification obj = (PureMVC.Patterns.Observer.Notification)ToLua.CheckObject <PureMVC.Patterns.Observer.Notification>(L, 1); string o = obj.ToString(); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }