public void MakeUrl_NonTcp() { var connection = new KernelConnection() { Transport = "file", IpAddress = "1.2.3.4", ShellPort = 1234, IoPubPort = 1235, StdinPort = 1236, HbPort = 1237, ControlPort = 1238 }; Assert.AreEqual("file://1.2.3.4-1234", connection.MakeUrl("shell")); Assert.AreEqual("file://1.2.3.4-1234", connection.MakeUrl("ShElL")); // Case doesn't matter Assert.AreEqual("file://1.2.3.4-1235", connection.MakeUrl("iopub")); Assert.AreEqual("file://1.2.3.4-1236", connection.MakeUrl("stdin")); Assert.AreEqual("file://1.2.3.4-1237", connection.MakeUrl("hb")); Assert.AreEqual("file://1.2.3.4-1238", connection.MakeUrl("control")); }
public void MakeUrl_InvalidChannel() { var connection = new KernelConnection(); Assert.ThrowsException <InvalidChannelException>(() => connection.MakeUrl("invalid")); }