public void PublishTest() { ServerPump target = new ServerPump(); // TODO: Initialize to an appropriate value ServiceBusEvent data = null; // TODO: Initialize to an appropriate value target.Publish(data); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void HeartbeatTest() { ServerPump target = new ServerPump(); // TODO: Initialize to an appropriate value Guid clientId = new Guid(); // TODO: Initialize to an appropriate value target.Heartbeat(clientId); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
static void Main(string[] args) { ServerPump pump = new ServerPump { Storage = new ShortBus.SQLStore.SubscriberStore() }; pump.Start(); Console.Write("Hit a key to exit.."); Console.ReadKey(); pump.Stop(); }
public void Unsubscribe_removes_subscription_from_storage() { Mock <ISubscriberStore> subscribers = new Mock <ISubscriberStore>(); Guid clientId = Guid.Empty; subscribers.Setup(foo => foo.RemoveSubscriber(clientId)).Verifiable(); ServerPump target = new ServerPump(); target.Storage = subscribers.Object; target.Unsubscribe(clientId); subscribers.Verify(); }
public void Subscribe_adds_subscription_to_storage() { Mock <ISubscriberStore> subscribers = new Mock <ISubscriberStore>(); Guid clientId = Guid.Empty; string clientEndpoint = GetFakeClientEndpoint(clientId); subscribers.Setup(foo => foo.AddSubscriber(clientId, clientEndpoint)) .Returns(new Subscriber { LastSeen = DateTime.MinValue, Endpoint = clientEndpoint, SubscriberId = clientId }) .Verifiable("Server pump did not persist subscriber"); ServerPump target = new ServerPump(); target.Storage = subscribers.Object; target.Subscribe(clientId, clientEndpoint); subscribers.Verify(); }
public void ServerPumpConstructorTest() { ServerPump target = new ServerPump(); Assert.Inconclusive("TODO: Implement code to verify target"); }