Tests.StatsdTests.Timer.send_timer_with_lambda C# (CSharp) Method

send_timer_with_lambda() private method

private send_timer_with_lambda ( ) : void
return void
            public void send_timer_with_lambda()
            {
                const string statName = "name";
                var stopwatch = MockRepository.GenerateMock<IStopwatch>();
                stopwatch.Stub(x => x.ElapsedMilliseconds()).Return(500);
                _stopwatch.Stub(x => x.Get()).Return(stopwatch);

                var s = new Statsd(_udp, _randomGenerator, _stopwatch);
                s.Send(() => TestMethod(), statName);

                _udp.AssertWasCalled(x => x.Send("name:500|ms"));
            }