Beispiel #1
0
 public ShhSymKey(IClient client) : base(client)
 {
     AddSymKey    = new ShhAddSymKey(client);
     DeleteSymKey = new ShhDeleteSymKey(client);
     GenerateSymKeyFromPassword = new ShhGenerateSymKeyFromPassword(client);
     GetSymKey = new ShhGetSymKey(client);
     HasSymKey = new ShhHasSymKey(client);
     NewSymKey = new ShhNewSymKey(client);
 }
Beispiel #2
0
        public async void ShouldReturnResult()
        {
            var addSymKey    = new ShhAddSymKey(Client);
            var hasSymKey    = new ShhHasSymKey(Client);
            var getSymKey    = new ShhGetSymKey(Client);
            var deleteSymKey = new ShhDeleteSymKey(Client);

            var addResult = await addSymKey.SendRequestAsync(Settings.GetDefaultShhPrivateKey());

            var hasSymKeyResult = await hasSymKey.SendRequestAsync(addResult);

            var getSymKeyResult = await getSymKey.SendRequestAsync(addResult);

            var deleteSymKeyResult = await deleteSymKey.SendRequestAsync(addResult);

            Assert.NotNull(addResult);
            Assert.True(hasSymKeyResult);
            Assert.Equal(Settings.GetDefaultShhPrivateKey(), getSymKeyResult);
            Assert.True(deleteSymKeyResult);
        }