public static void Test_Accepts_Expected_Ports() { //can't do test cases because it's not const //arrange ProxyLoadBalancerConnectionGateKeeper keeper = new ProxyLoadBalancerConnectionGateKeeper(); //assert Assert.True(keeper.isValidPort(InboundConnectionSettings.Default.AuthServiceSessionPort)); Assert.True(keeper.isValidPort(InboundConnectionSettings.Default.ClientSessionPort)); }
public static void Test_Rejects_Unexpected_Ports(int port) { //can't do test cases because it's not const //arrange ProxyLoadBalancerConnectionGateKeeper keeper = new ProxyLoadBalancerConnectionGateKeeper(); //assert Assert.IsFalse(keeper.isValidPort(port), "Found an unexpected accepted port {0}", port); }