public void FlushToTextWriter() { var stringWriter = new StringWriter(); _counter.Flush(stringWriter); var str = stringWriter.ToString(); str.Should().Contain(_counterLabel.Name); var expected = _value.ToString(DoubleConverter.Pattern, CultureInfo.InvariantCulture); str.Should().Contain(expected); }