public void GetValue_ValueDosentMatchFormat_ThrowsFormatException() { IConverter<Guid> converter = new GuidConverter("N"); Action action = () => converter.GetValue("00000000-0000-0000-0000-000000000000"); Assert.Throws<FormatException>(action); }
public void GetValue_NullFormat_IsValid(string value) { IConverter<Guid> converter = new GuidConverter(); Guid result = converter.GetValue(value); Assert.Equal(new Guid(new byte[16]), result); }
public void GetValue_FormatSpecified_IsValid() { IConverter<Guid> converter = new GuidConverter("N"); Guid result = converter.GetValue("00000000000000000000000000000000"); Assert.Equal(new Guid(new byte[16]), result); }
public void GetValue_ValueDosentMatchFormat_ThrowsFormatException() { IConverter <Guid> converter = new GuidConverter("N"); Action action = () => converter.GetValue("00000000-0000-0000-0000-000000000000"); Assert.Throws <FormatException>(action); }
public void GetValue_FormatSpecified_IsValid() { IConverter <Guid> converter = new GuidConverter("N"); Guid result = converter.GetValue("00000000000000000000000000000000"); Assert.Equal(new Guid(new byte[16]), result); }
public void GetValue_NullFormat_IsValid(string value) { IConverter <Guid> converter = new GuidConverter(); Guid result = converter.GetValue(value); Assert.Equal(new Guid(new byte[16]), result); }