public static async Task <TravisPublicKeyService> Create(TravisType travisType, HttpClient client) { var obj = new TravisPublicKeyService(travisType, client); await obj.FetchPublicKey(); return(obj); }
public TravisMessageModel(string message, string signature, IMemoryCache cache, Encoding encoding, HttpClient client) { digestedMessage = Sha1.DigestMessage(message, encoding); type = GetTravisType(message); this.signature = Convert.FromBase64String(signature); this.cache = cache; this.client = client; }
private TravisPublicKeyService(TravisType type, HttpClient client) { this.type = type; this.client = client; }
public void ReturnCorrectType(string buildurl, TravisType expected) { Assert.Equal(TravisMessageModel.GetTravisType(buildurl), expected); }