public void UpdatePolicyDescriptionTest() { CertPolicyManager mgr = CreateManager(); CertPolicy newCertPolicy = new CertPolicy("UnitTestPolicy", "UnitTest Policy Description", "1 = 1".ToBytesUtf8()); mgr.Add(newCertPolicy); CertPolicy actualCertPolicy = mgr.Get("UnitTestPolicy"); actualCertPolicy.Should().NotBeNull(); actualCertPolicy.Description = "blank"; mgr.Update(actualCertPolicy); CertPolicy updatedCertPolicy = mgr.Get("UnitTestPolicy"); updatedCertPolicy.Description.ShouldBeEquivalentTo("blank"); }
public void UpdatePolicyDataTest() { CertPolicyManager mgr = CreateManager(); CertPolicy newCertPolicy = new CertPolicy("UnitTestPolicy", "UnitTest Policy Description", "1 = 1".ToBytesUtf8()); mgr.Add(newCertPolicy); CertPolicy actualCertPolicy = mgr.Get("UnitTestPolicy"); actualCertPolicy.Should().NotBeNull(); actualCertPolicy.Data = "1 != 1".ToBytesUtf8(); mgr.Update(actualCertPolicy); CertPolicy updatedCertPolicy = mgr.Get("UnitTestPolicy"); updatedCertPolicy.Data.ToUtf8String().ShouldAllBeEquivalentTo("1 != 1"); }