public void RetrieveVerityPublicDid_exceptionWhenNon200() { Assert.ThrowsException <IOException>(() => { var httpClient = getHttpClient("{}"); Did did = VerityUtil.retrieveVerityPublicDid("http://localhost", httpClient); }); }
public void RetrieveVerityPublicDid_canMock() { var httpClient = getHttpClient("{\"DID\":\"CV65RFpeCtPu82hNF9i61G\",\"verKey\":\"7G3LhXFKXKTMv7XGx1Qc9wqkMbwcU2iLBHL8x1JXWWC2\"}"); Did did = VerityUtil.retrieveVerityPublicDid("http://localhost", httpClient); Assert.AreEqual("CV65RFpeCtPu82hNF9i61G", did.did); Assert.AreEqual("7G3LhXFKXKTMv7XGx1Qc9wqkMbwcU2iLBHL8x1JXWWC2", did.verkey); }