public void ParserUtilsIsValidUTF8ThrowsOnInvalidUTF8() { // arrange - act - assert TestAssert.Throws <ArgumentException>(() => ParserUtils.EnsureUTF8String(null)); TestAssert.Throws <ArgumentException>(() => ParserUtils.EnsureUTF8String("")); TestAssert.Throws <ArgumentException>(() => ParserUtils.EnsureUTF8String(" ")); TestAssert.Throws <ArgumentException>(() => ParserUtils.EnsureUTF8String("this is not a valid UTF8 \u1234")); }
public void ParserUtils_IsValidUTF8_SucceedOnUTF8() { // arrange - act - assert ParserUtils.EnsureUTF8String("this-is-a-valid-UTF8"); }