public async Task itShouldLogARequestOfTypeStringForWarning() { string contentToBeLogged = "Home Page"; FyipeLogger fyipeLogger = new FyipeLogger(apiUrl, applicationLogId, applicationLogKey); LogApiResponse res = await fyipeLogger.Warning(contentToBeLogged); Assert.AreEqual(contentToBeLogged, res.content.ToString()); Assert.AreEqual("warning", res.type); }
public async Task itShouldLogARequestOfTypeObjectForWarningWith3Tags() { string contentToBeLogged = "Home Page"; FyipeLogger fyipeLogger = new FyipeLogger(apiUrl, applicationLogId, applicationLogKey); string[] tags = { "server", "content", "monitoring" }; LogApiResponse res = await fyipeLogger.Warning(contentToBeLogged, tags); Assert.AreEqual(contentToBeLogged, res.content.ToString()); Assert.AreEqual("warning", res.type); for (int i = 0; i < tags.Length; i++) { Assert.AreEqual(tags[i], res.tags[i].ToString()); } }