VerifyCompatibility() public méthode

public VerifyCompatibility ( Schema changedSchema ) : void
changedSchema Pomona.Schemas.Schema
Résultat void
 public void VerifyCompatibility_WithNonBreakingChange_ThrowsNoException()
 {
     var verifier = new ApiChangeVerifier(this.tempDir);
     var schema = SchemaTests.CreateSchema();
     verifier.MarkApiVersion(schema);
     schema.Version = "1.3.3.8";
     schema.Types[0].Properties.Add(new KeyValuePair<string, SchemaPropertyEntry>("newProp",
                                                                                  new SchemaPropertyEntry
                                                                                  {
                                                                                      Name = "newProp",
                                                                                      Type = "string"
                                                                                  }));
     verifier.VerifyCompatibility(schema);
 }
 public void VerifyCompatibility_WithBreakingChange_ThrowsException()
 {
     var verifier = new ApiChangeVerifier(tempDir);
     var schema = SchemaTests.CreateSchema();
     verifier.MarkApiVersion(schema);
     schema.Version = "1.3.3.8";
     schema.Types[0].Properties.Add(new KeyValuePair<string, SchemaPropertyEntry>("newProp",
                                                                                  new SchemaPropertyEntry
                                                                                      {
                                                                                          Name = "newProp",
                                                                                          Type = "string",
                                                                                          Required = true
                                                                                      }));
     Assert.That(() => verifier.VerifyCompatibility(schema), Throws.Exception);
 }