예제 #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();
        }