public void TestTraceMethodWithReturnValue() { _recorder.BeginSegment("test", TraceId); int count = _recorder.TraceMethod("PlusOneReturn", () => PlusOneReturn(0)); Assert.AreEqual(1, count); var subsegment = AWSXRayRecorder.Instance.TraceContext.GetEntity().Subsegments[0]; Assert.AreEqual("PlusOneReturn", subsegment.Name); _recorder.EndSegment(); }