public void ReceptionistFlow_connects_to_local_deployment_by_default() { var receptionistFlow = new ReceptionistFlow("My-Worker-Id"); Assert.DoesNotThrow(() => connection = receptionistFlow.CreateAsync(GetConnectionParameters()).Result); Assert.AreEqual(ConnectionStatusCode.Success, connection.GetConnectionStatusCode()); }
public void ReceptionistFlow_propagates_my_worker_id() { var receptionistFlow = new ReceptionistFlow("My-Worker-Id"); connection = receptionistFlow.CreateAsync(GetConnectionParameters()).Result; Assert.AreEqual("My-Worker-Id", connection.GetWorkerId()); }
public void ReceptionistFlow_fails_to_connection_with_invalid_port() { var receptionistFlow = new ReceptionistFlow("My-Worker-Id") { ReceptionistPort = 1337 }; var aggregateException = Assert.Throws <AggregateException>(() => connection = receptionistFlow.CreateAsync(GetConnectionParameters()).Result); Assert.IsInstanceOf <ConnectionFailedException>(aggregateException.InnerExceptions[0]); }