public void TestLoadFromConfigJsonFileNotExists() { // Should not be able to instantiate a new instance of "Client" without an actual configuration file NetworkConfig.FromJsonFile("FileDoesNotExist.json"); }
public void TestLoadFromConfigFileJsonBasic() { string f = TestUtils.TestUtils.RelocateFilePathsJSON("fixture/sdkintegration/network_configs/network-config.json".Locate()); NetworkConfig config = NetworkConfig.FromJsonFile(f); Assert.IsNotNull(config); }
public void TestLoadFromConfigFileJson() { // Should be able to instantiate a new instance of "Client" with a valid path to the JSON configuration string f = TestUtils.TestUtils.RelocateFilePathsJSON("fixture/sdkintegration/network_configs/network-config.json".Locate()); NetworkConfig config = NetworkConfig.FromJsonFile(f); Assert.IsNotNull(config); //HFClient client = HFClient.loadFromConfig(f); //Assert.Assert.IsNotNull(client); HFClient client = HFClient.Create(); client.CryptoSuite = Factory.Instance.GetCryptoSuite(); client.UserContext = TestUtils.TestUtils.GetMockUser(USER_NAME, USER_MSP_ID); Channel channel = client.LoadChannelFromConfig("mychannel", config); Assert.IsNotNull(channel); }
public void TestLoadFromConfigNullJsonFile() { // Should not be able to instantiate a new instance of "Client" without a valid path to the configuration'); NetworkConfig.FromJsonFile(null); }