public async Task itShouldRejectInvalidApplicationLog() { FyipeLogger fyipeLogger = new FyipeLogger(apiUrl, applicationLogId, "randomkey"); LogApiResponse res = await fyipeLogger.Log("content"); Assert.AreEqual("Application Log does not exist.", res.message); }
public async Task itShouldRequestForContent() { FyipeLogger fyipeLogger = new FyipeLogger(apiUrl, applicationLogId, ""); LogApiResponse res = await fyipeLogger.Log(""); Assert.AreEqual("Content to be logged is required.", res.message); }
public async Task itShouldRequestForApplicationLogKey() { FyipeLogger fyipeLogger = new FyipeLogger(apiUrl, applicationLogId, ""); LogApiResponse res = await fyipeLogger.Log("Random"); Assert.AreEqual("Application Log Key is required.", res.message); }
public async Task itShouldLogARequestOfTypeObject() { SampleLog contentToBeLogged = new SampleLog("Home Page", 50, "Travis"); FyipeLogger fyipeLogger = new FyipeLogger(apiUrl, applicationLogId, applicationLogKey); LogApiResponse res = await fyipeLogger.Log(contentToBeLogged); Assert.AreEqual("info", res.type); }
public async Task itShouldLogARequestOfTypeString() { string contentToBeLogged = "I want to log this"; FyipeLogger fyipeLogger = new FyipeLogger(apiUrl, applicationLogId, applicationLogKey); LogApiResponse res = await fyipeLogger.Log(contentToBeLogged); Assert.AreEqual(contentToBeLogged, res.content.ToString()); Assert.AreEqual("info", res.type); }