Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }