public override Log_Item logItem(Log_Item item) { if (TM_UserData.Current.firebase_Log_DebugMsg()) { var submitData = new API_Firebase.SubmitData(item, API_Firebase.Submit_Type.ADD); apiFirebase.submit(submitData); } return item; }
public override Log_Item logItem(Log_Item item) { if (TM_UserData.Current.firebase_Log_DebugMsg()) { var submitData = new API_Firebase.SubmitData(item, API_Firebase.Submit_Type.ADD); apiFirebase.submit(submitData); } return(item); }
public void POST() { var type = 10.randomLetters(); var text = 10.randomLetters(); var logItem = new Log_Item(type, text); var responseJson = firebase.POST(logItem); var response = responseJson.json_Deserialize<API_Firebase.PostResponse>(); Assert.IsNotNull(response); Assert.IsTrue (response.name.valid()); 2000.sleep(); firebase.DELETE(); //Assert.IsTrue(response.contains("{\"name\"")); }
public void logItem() { Assert.IsEmpty (tmLogger.LogItems); var type = 10.randomLetters(); var text = 10.randomLetters(); var newItem_Type = 10.randomLetters(); var newItem_Text = 10.randomLetters(); var newItem = new Log_Item(newItem_Type, newItem_Text); var logItem1 = tmLogger.logItem(type, text); var logItem2 = tmLogger.logItem(newItem); var logItem3 = tmLogger.logItem(logItem2); Assert.NotNull (logItem1); Assert.NotNull (logItem2); Assert.NotNull (logItem3); Assert.AreEqual(logItem1.Type, type); Assert.AreEqual(logItem1.Text, text); Assert.AreEqual(logItem2.Type, newItem_Type); Assert.AreEqual(logItem2.Text, newItem_Text); Assert.LessOrEqual (logItem1.When , DateTime.Now.jsDate()); Assert.LessOrEqual (logItem1.When , DateTime.Now.jsDate()); Assert.GreaterOrEqual (logItem1.When, logItem2.When); Assert.AreEqual(logItem2 , logItem3); Assert.AreEqual(logItem2.When, logItem3.When); //check tmLogger.LogItems storage Assert.AreEqual(tmLogger.LogItems.size(), 3); Assert.AreEqual(logItem1, tmLogger.LogItems.first()); Assert.AreEqual(logItem2, tmLogger.LogItems.second()); Assert.AreEqual(logItem3, tmLogger.LogItems.third()); }
public virtual Log_Item logItem(Log_Item logItem) { LogItems.add(logItem); return(logItem); }
public virtual Log_Item logItem(Log_Item logItem) { LogItems.add(logItem); return logItem; }