public void FileScriptTest() { var f = BProtocol.ParseScript(NBitcoin.Script.FromHex(SampleScriptHex)); Assert.NotNull(f); Assert.Equal(SampleFileBody, System.Text.Encoding.UTF8.GetString(f.Body)); Assert.Equal(SampleFileMimeType, f.MimeType); Assert.Equal(SampleFileName, f.Name); }
public void ScriptTest() { var f = new BProtocol.FileScript { Body = System.Text.Encoding.UTF8.GetBytes(SampleFileBody), MimeType = SampleFileMimeType, Name = SampleFileName }; Assert.Equal(SampleScriptHex, BProtocol.GetScript(f).ToHex()); }