public void TestErrors() { IParser parser = new ZXingParser(); ParserResult result = parser.Decode(new Color32[0], 0, 0); Assert.IsNull(result); }
private void Scan() { var parser = new ZXingParser(); var result = parser.Decode(_codeImage.GetPixels32(), _codeImage.width, _codeImage.height); qrLink = result?.Value; }
public void TestCodes(string file, string check) { IParser parser = new ZXingParser(); var image = Resources.Load <Texture2D>(file); ParserResult result = parser.Decode(image.GetPixels32(), image.width, image.height); StringAssert.Contains(check, result.Value.ToLowerInvariant()); }
public void TestEmpty() { IParser parser = new ZXingParser(); var image = Resources.Load <Texture2D>("standard"); ParserResult result = parser.Decode(image.GetPixels32(), image.width, image.height); Assert.IsNull(result); }