public static void Test_IPString_In_Ctor_Translates_To_IP() { //arrange WebClientPeerDetails details = new WebClientPeerDetails(@"127.0.0.1", -1, 0); //assert: That remoteIP isn't null or default value. Assert.NotNull(details.RemoteIP); Assert.AreEqual(details.RemoteIP, IPAddress.Loopback); //should be true 127.0.0.1 Assert.AreNotEqual(details.RemoteIP, IPAddress.Any); }
public static void Test_Domain_In_Ctor_Translates_To_IP() { //arrange WebClientPeerDetails details = new WebClientPeerDetails(@"www.gooogle.com", -1, 0); //assert: That remoteIP isn't null or default value. Assert.NotNull(details.RemoteIP); Assert.AreNotEqual(details.RemoteIP, IPAddress.None); Assert.AreNotEqual(details.RemoteIP, IPAddress.Any); }
} //we have to have a setter, can't use C#6 readonly prop because FasterFlect when using SceneJect will complain that it can't find a setter. //call on Start, not awake. public virtual void Start() { //Uses HTTPS so default to established encryption Status = NetStatus.EncryptionEstablished; enqueuStrat = new RestSharpCurrentThreadEnqueueRequestHandlerStrategy(BaseUrl, deserializer, serializer, this, 0, new DefaultNetworkMessageRouteBackService(new AUIDServiceCollection <INetPeer>(1), classLogger)); NetworkSendService = new WebPeerClientMessageSender(enqueuStrat); PeerDetails = new WebClientPeerDetails(BaseUrl, 0, 0); }
public static void Test_NonNull_Ctor_Doesnt_Throw() { //arrange WebClientPeerDetails details = new WebClientPeerDetails(@"www.gooogle.com", -1, 0); }