Ejemplo n.º 1
0
        public void Adds_node_to_store_on_NodeRegistered_message()
        {
            const ulong  Id   = 4;
            const string Type = "test";
            var          msg  = new NodeRegistered(new RegisterMessage {
                Id = Id, Type = Type
            },
                                                   new IPEndPoint(IPAddress.Loopback, 123));

            tracker.Handle(msg);

            A.CallTo(() => store.AddNode(Id, Type, A <IReadOnlyList <string> > .Ignored))
            .MustHaveHappened(Repeated.Exactly.Once);
        }
Ejemplo n.º 2
0
 public void Handle(NodeRegistered notification)
 {
     logger.Debug($"Registering new node {notification.Message.Id}.");
     csDataStore.AddNode(notification.Message.Id, notification.Message.Type,
                         notification.Message.SolvableProblems);
 }