コード例 #1
0
ファイル: FyipeLoggerTest.cs プロジェクト: Fyipe/dotnet-sdk
        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);
        }
コード例 #2
0
ファイル: FyipeLoggerTest.cs プロジェクト: Fyipe/dotnet-sdk
        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());
            }
        }