コード例 #1
0
 public void Status_Should_Be_Unknown_When_Header_Does_Not_Contain_License_Expiration()
 {
     var headers = new Dictionary<string, string>();
     var licenseEnricher = new UpdateLicenseEnricher();
     var status = licenseEnricher.GetLicenseStatus(headers);
     Assert.IsTrue(status.Equals("unknown"));
 }
コード例 #2
0
 public void Status_Should_Be_Set_When_Header_Contains_License_Expiration(string hasLicenseExpired, string expectedResult)
 {
     var headers = new Dictionary<string, string>();
     const string hasLicenseExpiredKey = "$.diagnostics.license.expired";
     headers.Add(hasLicenseExpiredKey, hasLicenseExpired);
     var licenseEnricher = new UpdateLicenseEnricher();
     var status = licenseEnricher.GetLicenseStatus(headers);
     Assert.IsTrue(status.Equals(expectedResult));
 }