public void DoesNotContainANumber_WhenStringDoesContainANumber_WritesTraceMessage()
        {
            var listener = new TestListener();
            Trace.Listeners.Add(listener);

            var data = new FileData { StringValue = "1" };
            Assert.Throws<ArgumentException>(() => data.DoesNotContainANumber());

            Assert.AreEqual("Test:DoesNotContainANumberFailed:DoesNotContainANumber", listener.Output);
            Trace.Listeners.Remove(listener);
        }
 public void DoesNotContainANumber_WhenStringDoesContainANumber_Throws(string value)
 {
     var data = new FileData { StringValue = value };
     Assert.Throws<ArgumentException>(() => data.DoesNotContainANumber());
 }
 public void DoesNotContainANumber_WhenStringDoesNotContainANumber_Succeeds(string value)
 {
     var data = new FileData { StringValue = value };
     Assert.DoesNotThrow(() => data.DoesNotContainANumber());
 }