Exemplo n.º 1
0
        public static void Disconnect(EndPointSource <TEndPointId, TKey, TValue> source, TEndPointId validId)
        {
            Panel_DefaultValue <EndPoint <TEndPointId, TKey, TValue> > .IsDefault(source.ConnectedPoint);

            source.Disconnect();
            Panel_DefaultValue <EndPoint <TEndPointId, TKey, TValue> > .IsDefault(source.ConnectedPoint);

            source.Connect(validId);
            Panel_DefaultValue <EndPoint <TEndPointId, TKey, TValue> > .IsNotDefault(source.ConnectedPoint);

            source.Disconnect();
            Panel_DefaultValue <EndPoint <TEndPointId, TKey, TValue> > .IsDefault(source.ConnectedPoint);
        }
Exemplo n.º 2
0
        public static void Send(EndPointSource <TEndPointId, TKey, TValue> source, TEndPointId validId, TKey validKey, TKey wrongKey)
        {
            Panel_DefaultValue <EndPoint <TEndPointId, TKey, TValue> > .IsDefault(source.ConnectedPoint);

            TValue receiveValue = source.Send(validKey);

            Panel_DefaultValue <TValue> .IsDefault(receiveValue);

            source.Connect(validId);
            Panel_DefaultValue <EndPoint <TEndPointId, TKey, TValue> > .IsNotDefault(source.ConnectedPoint);

            receiveValue = source.Send(wrongKey);
            Panel_DefaultValue <TValue> .IsDefault(receiveValue);

            receiveValue = source.Send(validKey);
            Panel_DefaultValue <TValue> .IsNotDefault(receiveValue);
        }
Exemplo n.º 3
0
 public static void Connect_Absent(EndPointSource <TEndPointId, TKey, TValue> source, TEndPointId wrongId)
 {
     Assert.IsFalse(source.Connect(wrongId));
     Panel_DefaultValue <EndPoint <TEndPointId, TKey, TValue> > .IsDefault(source.ConnectedPoint);
 }