public void WrongNetworkThrowsArgumentException() { Exception exception = Record.Exception(() => NetworkHelpers.GetNetwork("myNetwork")); Assert.NotNull(exception); Assert.IsType <ArgumentException>(exception); }
public void GetTestNetNetworkReturnsNetworkTest() { Network test = KnownNetworks.TestNet; Network network = NetworkHelpers.GetNetwork("testnet"); Assert.Equal(KnownNetworks.TestNet, network); }
public void GetMainNetNetworkReturnsNetworkMain() { Network main = KnownNetworks.Main; Network network = NetworkHelpers.GetNetwork("mainnet"); Assert.Equal(KnownNetworks.Main, network); }
public void GetTestNetworkRetuirnsNetworkTest() { Network test = Network.TestNet; Network network = NetworkHelpers.GetNetwork("test"); Assert.Equal(Network.TestNet, network); }
public void GetNetworkIsCaseInsensitive() { Network testNetwork = NetworkHelpers.GetNetwork("Test"); Assert.Equal(Network.PurpleTest, testNetwork); Network mainNetwork = NetworkHelpers.GetNetwork("MainNet"); Assert.Equal(Network.PurpleMain, mainNetwork); }
public void GetNetworkIsCaseInsensitive() { Network test = KnownNetworks.TestNet; Network main = KnownNetworks.Main; Network testNetwork = NetworkHelpers.GetNetwork("Test"); Assert.Equal(KnownNetworks.TestNet, testNetwork); Network mainNetwork = NetworkHelpers.GetNetwork("MainNet"); Assert.Equal(KnownNetworks.Main, mainNetwork); }
/// <inheritdoc /> public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { return(NetworkHelpers.GetNetwork((string)reader.Value)); }
public void GetTestNetNetworkRetuirnsNetworkTest() { Network network = NetworkHelpers.GetNetwork("testnet"); Assert.Equal(Network.PurpleTest, network); }
public void GetMainNetNetworkRetuirnsNetworkMain() { Network network = NetworkHelpers.GetNetwork("mainnet"); Assert.Equal(Network.PurpleMain, network); }