public void TestBuildBothChaincodeSources() { InstallProposalBuilder builder = CreateTestBuilder(); builder.ChaincodeSource("some/dir"); builder.SetChaincodeInputStream(new MemoryStream("test string".ToBytes())); builder.Build(); }
public void TestBuildChaincodePathJavaStream() { InstallProposalBuilder builder = CreateTestBuilder(); builder.ChaincodeLanguage(TransactionRequest.Type.JAVA); builder.SetChaincodeInputStream(new MemoryStream("test string".ToBytes())); builder.ChaincodePath("null or empty string"); builder.Build(); }
public void TestBuildChaincodePathGolangStream() { InstallProposalBuilder builder = CreateTestBuilder(); builder.ChaincodeLanguage(TransactionRequest.Type.GO_LANG); builder.SetChaincodeInputStream(new MemoryStream("test string".ToBytes())); builder.ChaincodePath(null); builder.Build(); }
public void TestBuildChaincodePathNodeStream() { InstallProposalBuilder builder = CreateTestBuilder(); builder.ChaincodeLanguage(TransactionRequest.Type.NODE); builder.SetChaincodeInputStream(new MemoryStream("test string".ToBytes())); builder.ChaincodePath("src"); builder.Build(); }
public void TestBuildInvalidSource() { // A mock InputStream that throws an IOException InstallProposalBuilder builder = CreateTestBuilder(); builder.ChaincodeLanguage(TransactionRequest.Type.JAVA); builder.SetChaincodeInputStream(new MockInputStream()); builder.Build(); }