From bb8eba78bc3b176dc39481a98b1303dbe63f72b7 Mon Sep 17 00:00:00 2001 From: Luk Vermeulen Date: Sun, 25 Sep 2016 09:55:00 +0200 Subject: [PATCH] update to netcore.app 1.0.1 --- global.json | 2 +- src/Flurl.Http.Xml/project.json | 2 +- test/Flurl.Http.Xml.Tests/MicrosoftXmlSerializerShould.cs | 5 ++--- test/Flurl.Http.Xml.Tests/RealHttpTests.cs | 6 ++++-- test/Flurl.Http.Xml.Tests/project.json | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/global.json b/global.json index bd8d538..95de465 100644 --- a/global.json +++ b/global.json @@ -1,4 +1,4 @@ { "projects": [ "src", "test" ], - "sdk": { "version": "1.0.0-preview2-003121" } + "sdk": { "version": "1.0.0-preview2-003131" } } \ No newline at end of file diff --git a/src/Flurl.Http.Xml/project.json b/src/Flurl.Http.Xml/project.json index 64dbfe5..3b27651 100644 --- a/src/Flurl.Http.Xml/project.json +++ b/src/Flurl.Http.Xml/project.json @@ -32,7 +32,7 @@ }, "dependencies": { - "Flurl.Http": "1.0.0" + "Flurl.Http": "1.0.3" }, "frameworks": { diff --git a/test/Flurl.Http.Xml.Tests/MicrosoftXmlSerializerShould.cs b/test/Flurl.Http.Xml.Tests/MicrosoftXmlSerializerShould.cs index 392c018..ef94d95 100644 --- a/test/Flurl.Http.Xml.Tests/MicrosoftXmlSerializerShould.cs +++ b/test/Flurl.Http.Xml.Tests/MicrosoftXmlSerializerShould.cs @@ -15,7 +15,7 @@ public class MicrosoftXmlSerializerShould const string XML_WITH_DECLARATION = @"" + "\r\n" + XML_WITHOUT_DECLARATION; - private MicrosoftXmlSerializer _serializer; + private readonly MicrosoftXmlSerializer _serializer; public MicrosoftXmlSerializerShould() { @@ -27,8 +27,7 @@ public MicrosoftXmlSerializerShould() public void Serialize() { var model = new TestModel { Number = 3, Text = "Test" }; - string s = _serializer.Serialize(model); - model = _serializer.Deserialize(s); + model = _serializer.Deserialize(_serializer.Serialize(model)); Assert.Equal(3, model.Number); Assert.Equal("Test", model.Text); diff --git a/test/Flurl.Http.Xml.Tests/RealHttpTests.cs b/test/Flurl.Http.Xml.Tests/RealHttpTests.cs index 1296ab4..b02c09f 100644 --- a/test/Flurl.Http.Xml.Tests/RealHttpTests.cs +++ b/test/Flurl.Http.Xml.Tests/RealHttpTests.cs @@ -33,7 +33,8 @@ public async Task GetXDocument() [Fact] public async Task PostXmlToModel() { - var result = await "http://putsreq.com/JMG62khbf6IWRR8Bz9nU" + // outsreq set up with response builder: response.body = request.body + var result = await "http://putsreq.com/icFb09Wa6dAtW0DHSEm1" .PostXmlAsync(new TestModel { Number = 3, Text = "Test" }) .ReceiveXml(); @@ -44,7 +45,8 @@ public async Task PostXmlToModel() [Fact] public async Task PostXmlToXDocument() { - var result = await "http://putsreq.com/JMG62khbf6IWRR8Bz9nU" + // outsreq set up with response builder: response.body = request.body + var result = await "http://putsreq.com/icFb09Wa6dAtW0DHSEm1" .PostXmlAsync(new TestModel {Number = 3, Text = "Test"}) .ReceiveXDocument(); diff --git a/test/Flurl.Http.Xml.Tests/project.json b/test/Flurl.Http.Xml.Tests/project.json index e5e1a4b..03eac77 100644 --- a/test/Flurl.Http.Xml.Tests/project.json +++ b/test/Flurl.Http.Xml.Tests/project.json @@ -7,7 +7,7 @@ "dotnet-test-xunit": "2.2.0-preview2-build1029", "Flurl.Http.Xml": { "target": "project" }, "OpenCover": "4.6.519", - "xunit": "2.1.0" + "xunit": "2.2.0-beta2-build3300" }, "frameworks": { @@ -16,7 +16,7 @@ "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0" + "version": "1.0.1" } } }