public void ConvertWithInstanceThrowsIfConverterIsNull() { var format = new StringFormatTest("3"); HiddenConverter converter = null; Assert.That( () => ConvertFormat.With(converter, format), Throws.ArgumentNullException); }
public void ConvertWithInstance() { var format = new StringFormatTest("3"); var converter = new HiddenConverter(); Assert.That( ConvertFormat.With(converter, format), Is.EqualTo(3)); }
public void ConvertWithThrowsIfFormatIsNull() { StringFormatTest format = null; Assert.That( () => ConvertFormat.With <HiddenConverter>(format), Throws.ArgumentNullException); Assert.That( () => ConvertFormat.With <HiddenConverter, int>(4, format), Throws.ArgumentNullException); var converter = new HiddenConverter(); Assert.That( () => ConvertFormat.With(converter, format), Throws.ArgumentNullException); }