Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
182c066
Code generated for updated swagger spec
pankajsn Jan 20, 2017
14e23e1
Updated IntegrationAccount SkuName
pankajsn Jan 20, 2017
cbae5f7
Updated the SDK package version
pankajsn Jan 23, 2017
0d100ca
Map and Schema test session records added
pankajsn Jan 31, 2017
20ca5b2
[Bug fix] : Swagger spec updated with latest changes. LogicApp and In…
pankajsn Jan 20, 2017
35472c8
Merge branch 'AutoRest' of https://github.com/pankajsn/azure-sdk-for-…
pankajsn Jan 31, 2017
affb7e3
Fake credentials ignored in the session records
pankajsn Jan 31, 2017
b0a40a0
ID, Name, Type properties are set to read only in IntegrationAccountR…
pankajsn Feb 1, 2017
cc7bee0
Regenerated with linter warning fixes in the swagger spec
pankajsn Feb 2, 2017
d937fe0
Resolved AutoRest linter validation warnings
pankajsn Feb 8, 2017
3753c1d
Removed white space in the agreement scenario test
pankajsn Feb 8, 2017
d93bf92
Code regerated with swagger spec updates: Naming conv. , marked requi…
pankajsn Feb 10, 2017
408117c
Renerated with latest updates(review comments) in the swagger spec
pankajsn Feb 11, 2017
0e0670c
Package major version incremented to 2.0.0
pankajsn Feb 11, 2017
251e0cd
descriptiom fixed for schema
pankajsn Feb 13, 2017
5642d42
generated.cmd file updated with the swagger spec path (with commit ID)
pankajsn Feb 14, 2017
480e077
credscan warnings fixed in session records
pankajsn Feb 14, 2017
8bca7cd
updated reference version number in project.json
pankajsn Feb 15, 2017
f42a24c
Updated the assembly version to make it consistent with project json.
pankajsn Feb 15, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Code regerated with swagger spec updates: Naming conv. , marked requi…
…red fields and other comments
  • Loading branch information
pankajsn committed Feb 10, 2017
commit d93bf924feab4f00ead006c0113b734ee35718c0
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public void IntegrationAccountAgreement_ListByResourceGroup_Exception()
};

Assert.Throws<ValidationException>(
() => client.IntegrationAccountAgreements.List(null, "IntegrationAccount"));
Assert.Throws<CloudException>(() => client.IntegrationAccountAgreements.List(ResourceGroupName, "IntegrationAccount"));
() => client.Agreements.ListByIntegrationAccounts(null, "IntegrationAccount"));
Assert.Throws<CloudException>(() => client.Agreements.ListByIntegrationAccounts(ResourceGroupName, "IntegrationAccount"));
}

[Fact]
Expand All @@ -60,7 +60,7 @@ public void IntegrationAccountAgreement_ListByResourceGroup_Success()
Content = this.AgreementList
};

var result = client.IntegrationAccountAgreements.List(ResourceGroupName, "IntegrationAccount");
var result = client.Agreements.ListByIntegrationAccounts(ResourceGroupName, "IntegrationAccount");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -82,8 +82,8 @@ public void IntegrationAccountAgreement_ListByResourceGroupNext_Exception()
Content = new StringContent(string.Empty)
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.ListNext(null));
Assert.Throws<CloudException>(() => client.IntegrationAccountAgreements.ListNext(Constants.NextPageLink));
Assert.Throws<ValidationException>(() => client.Agreements.ListByIntegrationAccountsNext(null));
Assert.Throws<CloudException>(() => client.Agreements.ListByIntegrationAccountsNext(Constants.NextPageLink));
}

[Fact]
Expand All @@ -98,7 +98,7 @@ public void IntegrationAccountAgreement_ListByResourceGroupNext_Success()
Content = this.AgreementList
};

var result = client.IntegrationAccountAgreements.ListNext(Constants.NextPageLink);
var result = client.Agreements.ListByIntegrationAccountsNext(Constants.NextPageLink);

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -120,11 +120,12 @@ public void IntegrationAccountAgreement_CreateOrUpdate_Exception()
Content = new StringContent(string.Empty)
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.CreateOrUpdate(null, "IntegrationAccountName", "AgreementName", new IntegrationAccountAgreement()));
Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.CreateOrUpdate(ResourceGroupName, null, "AgreementName", new IntegrationAccountAgreement()));
Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", null, new IntegrationAccountAgreement()));
Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", null));
Assert.Throws<CloudException>(() => client.IntegrationAccountAgreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", new IntegrationAccountAgreement()));
var agreeement = new IntegrationAccountAgreement(AgreementType.Edifact, "hostPartner", "guestPartner", new BusinessIdentity("a", "b"), new BusinessIdentity("a", "b"), new AgreementContent());
Assert.Throws<ValidationException>(() => client.Agreements.CreateOrUpdate(null, "IntegrationAccountName", "AgreementName", new IntegrationAccountAgreement()));
Assert.Throws<ValidationException>(() => client.Agreements.CreateOrUpdate(ResourceGroupName, null, "AgreementName", new IntegrationAccountAgreement()));
Assert.Throws<ValidationException>(() => client.Agreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", null, new IntegrationAccountAgreement()));
Assert.Throws<ValidationException>(() => client.Agreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", null));
Assert.Throws<CloudException>(() => client.Agreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", agreeement));
}

[Fact]
Expand All @@ -139,7 +140,7 @@ public void IntegrationAccountAgreement_CreateOrUpdate_OK()
Content = this.Agreement
};

var result = client.IntegrationAccountAgreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", new IntegrationAccountAgreement());
var result = client.Agreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", new IntegrationAccountAgreement(AgreementType.Edifact, "hostPartner", "guestPartner", new BusinessIdentity("a", "b"), new BusinessIdentity("a", "b"), new AgreementContent()));

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -161,7 +162,7 @@ public void IntegrationAccountAgreement_CreateOrUpdate_Created()
Content = this.Agreement
};

var result = client.IntegrationAccountAgreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", new IntegrationAccountAgreement());
var result = client.Agreements.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "AgreementName", new IntegrationAccountAgreement(AgreementType.Edifact,"hostPartner", "guestPartner", new BusinessIdentity("a","b"),new BusinessIdentity("a","b"),new AgreementContent()));

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -182,10 +183,10 @@ public void IntegrationAccountAgreement_Delete_Exception()
StatusCode = HttpStatusCode.NotFound
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.Delete(null, "IntegrationAccountName", "AgreementName"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.Delete(ResourceGroupName, null, "AgreementName"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.Delete(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.IntegrationAccountAgreements.Delete(ResourceGroupName, "IntegrationAccountName", "AgreementName"));
Assert.Throws<ValidationException>(() => client.Agreements.Delete(null, "IntegrationAccountName", "AgreementName"));
Assert.Throws<ValidationException>(() => client.Agreements.Delete(ResourceGroupName, null, "AgreementName"));
Assert.Throws<ValidationException>(() => client.Agreements.Delete(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.Agreements.Delete(ResourceGroupName, "IntegrationAccountName", "AgreementName"));
}

[Fact]
Expand All @@ -199,7 +200,7 @@ public void IntegrationAccountAgreement_Delete_OK()
StatusCode = HttpStatusCode.OK
};

client.IntegrationAccountAgreements.Delete(ResourceGroupName, "IntegrationAccountName", "AgreementName");
client.Agreements.Delete(ResourceGroupName, "IntegrationAccountName", "AgreementName");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -217,7 +218,7 @@ public void IntegrationAccountAgreement_Delete_NoContent()
StatusCode = HttpStatusCode.NoContent
};

client.IntegrationAccountAgreements.Delete(ResourceGroupName, "IntegrationAccountName", "AgreementName");
client.Agreements.Delete(ResourceGroupName, "IntegrationAccountName", "AgreementName");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -236,10 +237,10 @@ public void IntegrationAccountAgreement_Get_Exception()
Content = new StringContent(string.Empty)
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.Get(null, "IntegrationAccountName", "AgreementName"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.Get(ResourceGroupName, null, "AgreementName"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountAgreements.Get(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.IntegrationAccountAgreements.Get(ResourceGroupName, "IntegrationAccountName", "AgreementName"));
Assert.Throws<ValidationException>(() => client.Agreements.Get(null, "IntegrationAccountName", "AgreementName"));
Assert.Throws<ValidationException>(() => client.Agreements.Get(ResourceGroupName, null, "AgreementName"));
Assert.Throws<ValidationException>(() => client.Agreements.Get(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.Agreements.Get(ResourceGroupName, "IntegrationAccountName", "AgreementName"));
}

[Fact]
Expand All @@ -254,7 +255,7 @@ public void IntegrationAccountAgreement_Get_OK()
Content = this.Agreement
};

var result = client.IntegrationAccountAgreements.Get(ResourceGroupName, "IntegrationAccountName", "AgreementName");
var result = client.Agreements.Get(ResourceGroupName, "IntegrationAccountName", "AgreementName");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public void IntegrationAccountCertificate_ListByResourceGroup_Exception()
};

Assert.Throws<ValidationException>(
() => client.IntegrationAccountCertificates.List(null, "IntegrationAccount",null));
Assert.Throws<CloudException>(() => client.IntegrationAccountCertificates.List(ResourceGroupName, "IntegrationAccount"));
() => client.Certificates.ListByIntegrationAccounts(null, "IntegrationAccount",null));
Assert.Throws<CloudException>(() => client.Certificates.ListByIntegrationAccounts(ResourceGroupName, "IntegrationAccount"));
}

[Fact]
Expand All @@ -59,7 +59,7 @@ public void IntegrationAccountCertificate_ListByResourceGroup_Success()
Content = this.CertificateList
};

var result = client.IntegrationAccountCertificates.List(ResourceGroupName, "IntegrationAccount");
var result = client.Certificates.ListByIntegrationAccounts(ResourceGroupName, "IntegrationAccount");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -81,8 +81,8 @@ public void IntegrationAccountCertificate_ListByResourceGroupNext_Exception()
Content = new StringContent(string.Empty)
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.ListNext(null));
Assert.Throws<CloudException>(() => client.IntegrationAccountCertificates.ListNext(Constants.NextPageLink));
Assert.Throws<ValidationException>(() => client.Certificates.ListByIntegrationAccountsNext(null));
Assert.Throws<CloudException>(() => client.Certificates.ListByIntegrationAccountsNext(Constants.NextPageLink));
}

[Fact]
Expand All @@ -97,7 +97,7 @@ public void IntegrationAccountCertificate_ListByResourceGroupNext_Success()
Content = this.CertificateList
};

var result = client.IntegrationAccountCertificates.ListNext(Constants.NextPageLink);
var result = client.Certificates.ListByIntegrationAccountsNext(Constants.NextPageLink);

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -119,11 +119,11 @@ public void IntegrationAccountCertificate_CreateOrUpdate_Exception()
Content = new StringContent(string.Empty)
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.CreateOrUpdate(null, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate()));
Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.CreateOrUpdate(ResourceGroupName, null, "IntegrationAccountCertificate", new IntegrationAccountCertificate()));
Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", null, new IntegrationAccountCertificate()));
Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", null));
Assert.Throws<CloudException>(() => client.IntegrationAccountCertificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate()));
Assert.Throws<ValidationException>(() => client.Certificates.CreateOrUpdate(null, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate()));
Assert.Throws<ValidationException>(() => client.Certificates.CreateOrUpdate(ResourceGroupName, null, "IntegrationAccountCertificate", new IntegrationAccountCertificate()));
Assert.Throws<ValidationException>(() => client.Certificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", null, new IntegrationAccountCertificate()));
Assert.Throws<ValidationException>(() => client.Certificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", null));
Assert.Throws<CloudException>(() => client.Certificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate()));
}

[Fact]
Expand All @@ -138,7 +138,7 @@ public void IntegrationAccountCertificate_CreateOrUpdate_OK()
Content = this.Certificate
};

var result = client.IntegrationAccountCertificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate());
var result = client.Certificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate());

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -160,7 +160,7 @@ public void IntegrationAccountCertificate_CreateOrUpdate_Created()
Content = this.Certificate
};

var result = client.IntegrationAccountCertificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate());
var result = client.Certificates.CreateOrUpdate(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate", new IntegrationAccountCertificate());

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -181,10 +181,10 @@ public void IntegrationAccountCertificate_Delete_Exception()
StatusCode = HttpStatusCode.NotFound
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.Delete(null, "IntegrationAccountName", "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.Delete(ResourceGroupName, null, "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.Delete(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.IntegrationAccountCertificates.Delete(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.Certificates.Delete(null, "IntegrationAccountName", "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.Certificates.Delete(ResourceGroupName, null, "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.Certificates.Delete(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.Certificates.Delete(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate"));
}

[Fact]
Expand All @@ -198,7 +198,7 @@ public void IntegrationAccountCertificate_Delete_OK()
StatusCode = HttpStatusCode.OK
};

client.IntegrationAccountCertificates.Delete(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate");
client.Certificates.Delete(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -216,7 +216,7 @@ public void IntegrationAccountCertificate_Delete_NoContent()
StatusCode = HttpStatusCode.NoContent
};

client.IntegrationAccountCertificates.Delete(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate");
client.Certificates.Delete(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand All @@ -235,10 +235,10 @@ public void IntegrationAccountCertificate_Get_Exception()
Content = new StringContent(string.Empty)
};

Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.Get(null, "IntegrationAccountName", "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.Get(ResourceGroupName, null, "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.IntegrationAccountCertificates.Get(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.IntegrationAccountCertificates.Get(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.Certificates.Get(null, "IntegrationAccountName", "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.Certificates.Get(ResourceGroupName, null, "IntegrationAccountCertificate"));
Assert.Throws<ValidationException>(() => client.Certificates.Get(ResourceGroupName, "IntegrationAccountName", null));
Assert.Throws<CloudException>(() => client.Certificates.Get(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate"));
}

[Fact]
Expand All @@ -253,7 +253,7 @@ public void IntegrationAccountCertificate_Get_OK()
Content = this.Certificate
};

var result = client.IntegrationAccountCertificates.Get(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate");
var result = client.Certificates.Get(ResourceGroupName, "IntegrationAccountName", "IntegrationAccountCertificate");

// Validates request.
handler.Request.ValidateAuthorizationHeader();
Expand Down
Loading