コード例 #1
0
        public IEnumerator TesClientAttributesMethod_BacktraceDataShouldIncludeClientAttributes_ClientAttributesAreAvailableInDiagnosticData()
        {
            var key        = "foo2";
            var value      = "bar2";
            var attributes = new Dictionary <string, string>();

            attributes[key] = value;
            BacktraceClient.SetAttributes(attributes);

            BacktraceData data = null;

            BacktraceClient.BeforeSend = (BacktraceData reportData) =>
            {
                data = reportData;
                return(null);
            };
            BacktraceClient.Send(new Exception("foo"));
            yield return(new WaitForEndOfFrame());

            Assert.IsNotNull(data);
            Assert.AreEqual(data.Attributes.Attributes[key], value);
            yield return(null);
        }