示例#1
0
        public void TestBuildBothChaincodeSources()
        {
            InstallProposalBuilder builder = CreateTestBuilder();

            builder.ChaincodeSource("some/dir");
            builder.SetChaincodeInputStream(new MemoryStream("test string".ToBytes()));
            builder.Build();
        }
示例#2
0
        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();
        }
示例#3
0
        public void TestBuildChaincodePathGolangStream()
        {
            InstallProposalBuilder builder = CreateTestBuilder();

            builder.ChaincodeLanguage(TransactionRequest.Type.GO_LANG);
            builder.SetChaincodeInputStream(new MemoryStream("test string".ToBytes()));
            builder.ChaincodePath(null);

            builder.Build();
        }
示例#4
0
        public void TestBuildChaincodePathNodeStream()
        {
            InstallProposalBuilder builder = CreateTestBuilder();

            builder.ChaincodeLanguage(TransactionRequest.Type.NODE);
            builder.SetChaincodeInputStream(new MemoryStream("test string".ToBytes()));
            builder.ChaincodePath("src");

            builder.Build();
        }
示例#5
0
        public void TestBuildInvalidSource()
        {
            // A mock InputStream that throws an IOException


            InstallProposalBuilder builder = CreateTestBuilder();

            builder.ChaincodeLanguage(TransactionRequest.Type.JAVA);
            builder.SetChaincodeInputStream(new MockInputStream());

            builder.Build();
        }