Permalink
Browse files

Fix build break caused by Keane releasing a new album

  • Loading branch information...
1 parent 843ce09 commit a3d010a3cad770dbe20e25a84dd070a9955e37e3 Anthony Steele committed Jun 21, 2012
Showing with 23 additions and 8 deletions.
  1. +23 −8 src/SevenDigital.Api.Dynamic.Integration.Tests/DynamicXmlParserTests.cs
@@ -8,13 +8,16 @@
using SevenDigital.Api.Wrapper.EndpointResolution.OAuth;
using SevenDigital.Api.Wrapper.Utility.Http;
-namespace SevenDigital.Api.Dynamic.Integration.Tests {
+namespace SevenDigital.Api.Dynamic.Integration.Tests
+{
[TestFixture]
- public class DynamicXmlParserTests {
+ public class DynamicXmlParserTests
+ {
private RequestCoordinator _requestCoordinator;
[SetUp]
- public void SetUp() {
+ public void SetUp()
+ {
IOAuthCredentials oAuthCredentials = EssentialDependencyCheck<IOAuthCredentials>.Instance;
IApiUri apiUri = EssentialDependencyCheck<IApiUri>.Instance;
var httpGetResolver = new HttpClient();
@@ -24,7 +27,8 @@ public class DynamicXmlParserTests {
}
[Test]
- public void Can_get_an_artist() {
+ public void Can_get_an_artist()
+ {
const string endpoint = "artist/details";
var endPointInfo = new EndPointInfo { UriPath = endpoint, Parameters = new Dictionary<string,string> { { "artistId", "1" } } };
@@ -43,22 +47,33 @@ public class DynamicXmlParserTests {
}
[Test]
- public void Can_get_an_artists_releases() {
+ public void Can_get_an_artists_releases()
+ {
const string endpoint = "artist/releases";
- var endPointInfo = new EndPointInfo { UriPath = endpoint, Parameters = new Dictionary<string,string> { { "artistId", "1" } } };
+ var endPointInfo = new EndPointInfo
+ {
+ UriPath = endpoint,
+ Parameters = new Dictionary<string,string>
+ {
+ { "artistId", "1" },
+ { "pageSize", "100" }
+ }
+ };
var response = _requestCoordinator.HitEndpoint(endPointInfo);
dynamic dx = new DynamicXmlParser(XDocument.Parse(response.Body));
string [] titles = Enumerable.ToArray(Enumerable.Select<dynamic, string>(dx.releases.release, (Func<dynamic, string>) (r => r.title.value)));
- foreach (var title in titles) {
+ foreach (var title in titles)
+ {
Console.WriteLine(title);
}
- Assert.That(titles, Has.Member("Night Train").And.Member("Perfect Symmetry"));
+ Assert.That(titles, Has.Member("Night Train"));
+ Assert.That(titles, Has.Member("Perfect Symmetry"));
}
}
}

0 comments on commit a3d010a

Please sign in to comment.