From e4e7dbf553bfa17a39830e67d14d3715946beab3 Mon Sep 17 00:00:00 2001 From: Marcin Zelent Date: Tue, 12 Dec 2017 14:24:47 +0100 Subject: Added unit tests and fixed some bugs. --- PollutometerWebApi.Tests/AqiCalculatorTests.cs | 51 + PollutometerWebApi.Tests/EmailSenderTests.cs | 21 + .../PollutometerWebApi.Tests.csproj | 99 +- .../Properties/AssemblyInfo.cs | 36 + .../ReadingsControllerTests.cs | 116 + PollutometerWebApi.Tests/SqlOperatorTests.cs | 68 + PollutometerWebApi.Tests/Test.cs | 15 - PollutometerWebApi.Tests/app.config | 11 + .../bin/Debug/Microsoft.Web.Infrastructure.dll | Bin 45416 -> 0 bytes .../bin/Debug/PollutometerWebApi.Tests.dll | Bin 4096 -> 0 bytes .../bin/Debug/PollutometerWebApi.Tests.pdb | Bin 536 -> 0 bytes .../bin/Debug/PollutometerWebApi.dll | Bin 16896 -> 0 bytes .../bin/Debug/PollutometerWebApi.pdb | Bin 4216 -> 0 bytes .../bin/Debug/System.Net.Http.Formatting.dll | Bin 185032 -> 0 bytes .../bin/Debug/System.Net.Http.Formatting.xml | 2094 ---- .../bin/Debug/System.Web.Http.WebHost.dll | Bin 82120 -> 0 bytes .../bin/Debug/System.Web.Http.WebHost.xml | 135 - .../bin/Debug/System.Web.Http.dll | Bin 471248 -> 0 bytes .../bin/Debug/System.Web.Http.xml | 6664 ----------- .../bin/Debug/System.Web.Mvc.dll | Bin 566472 -> 0 bytes .../bin/Debug/System.Web.Mvc.xml | 11485 ------------------- .../bin/Debug/System.Web.Razor.dll | Bin 272072 -> 0 bytes .../bin/Debug/System.Web.Razor.xml | 5742 --------- .../bin/Debug/System.Web.WebPages.Deployment.dll | Bin 41672 -> 0 bytes .../bin/Debug/System.Web.WebPages.Deployment.xml | 60 - .../bin/Debug/System.Web.WebPages.Razor.dll | Bin 39624 -> 0 bytes .../bin/Debug/System.Web.WebPages.Razor.xml | 292 - .../bin/Debug/System.Web.WebPages.dll | Bin 211656 -> 0 bytes .../bin/Debug/System.Web.WebPages.xml | 2706 ----- .../bin/Debug/nunit.framework.dll | Bin 151552 -> 0 bytes .../bin/Debug/nunit.framework.xml | 10984 ------------------ .../PollutometerWebApi.Tests.csproj.CopyComplete | 0 ...eterWebApi.Tests.csproj.CoreCompileInputs.cache | 1 - ...tometerWebApi.Tests.csproj.FileListAbsolute.txt | 27 - ...bApi.Tests.csprojResolveAssemblyReference.cache | Bin 109342 -> 0 bytes .../obj/Debug/PollutometerWebApi.Tests.dll | Bin 4096 -> 0 bytes .../obj/Debug/PollutometerWebApi.Tests.pdb | Bin 536 -> 0 bytes PollutometerWebApi.Tests/packages.config | 8 +- PollutometerWebApi.sln | 21 +- PollutometerWebApi/App_Start/WebApiConfig.cs | 46 +- PollutometerWebApi/AqiCalculator.cs | 188 +- .../Controllers/ReadingsController.cs | 127 +- PollutometerWebApi/PollutometerWebApi.csproj | 47 +- PollutometerWebApi/SqlOperator.cs | 5 +- PollutometerWebApi/Views/Web.config | 2 +- .../Microsoft.AspNet.WebApi.5.2.3.nupkg | Bin 3193 -> 0 bytes .../Microsoft.AspNet.WebApi.Client.5.2.3.nupkg | Bin 188921 -> 0 bytes .../lib/net45/System.Net.Http.Formatting.dll | Bin 185544 -> 0 bytes .../lib/net45/System.Net.Http.Formatting.xml | 2094 ---- .../System.Net.Http.Formatting.dll | Bin 151240 -> 0 bytes .../System.Net.Http.Formatting.xml | 4025 ------- .../Content/web.config.transform | 11 - .../Microsoft.AspNet.WebApi.Core.5.2.3.nupkg | Bin 239426 -> 0 bytes .../lib/net45/System.Web.Http.dll | Bin 471240 -> 0 bytes .../lib/net45/System.Web.Http.xml | 6664 ----------- .../Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg | Bin 43077 -> 0 bytes .../lib/net45/System.Web.Http.WebHost.dll | Bin 82120 -> 0 bytes .../lib/net45/System.Web.Http.WebHost.xml | 135 - 58 files changed, 634 insertions(+), 53346 deletions(-) create mode 100644 PollutometerWebApi.Tests/AqiCalculatorTests.cs create mode 100644 PollutometerWebApi.Tests/EmailSenderTests.cs create mode 100644 PollutometerWebApi.Tests/Properties/AssemblyInfo.cs create mode 100644 PollutometerWebApi.Tests/ReadingsControllerTests.cs create mode 100644 PollutometerWebApi.Tests/SqlOperatorTests.cs delete mode 100644 PollutometerWebApi.Tests/Test.cs create mode 100644 PollutometerWebApi.Tests/app.config delete mode 100644 PollutometerWebApi.Tests/bin/Debug/Microsoft.Web.Infrastructure.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.pdb delete mode 100644 PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.pdb delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Http.WebHost.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Http.WebHost.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Http.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Http.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Mvc.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Mvc.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Razor.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.Razor.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.WebPages.Deployment.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.WebPages.Deployment.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.WebPages.Razor.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.WebPages.Razor.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.WebPages.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/System.Web.WebPages.xml delete mode 100644 PollutometerWebApi.Tests/bin/Debug/nunit.framework.dll delete mode 100644 PollutometerWebApi.Tests/bin/Debug/nunit.framework.xml delete mode 100644 PollutometerWebApi.Tests/obj/Debug/PollutometerWebApi.Tests.csproj.CopyComplete delete mode 100644 PollutometerWebApi.Tests/obj/Debug/PollutometerWebApi.Tests.csproj.CoreCompileInputs.cache delete mode 100644 PollutometerWebApi.Tests/obj/Debug/PollutometerWebApi.Tests.csproj.FileListAbsolute.txt delete mode 100644 PollutometerWebApi.Tests/obj/Debug/PollutometerWebApi.Tests.csprojResolveAssemblyReference.cache delete mode 100644 PollutometerWebApi.Tests/obj/Debug/PollutometerWebApi.Tests.dll delete mode 100644 PollutometerWebApi.Tests/obj/Debug/PollutometerWebApi.Tests.pdb delete mode 100644 packages/Microsoft.AspNet.WebApi.5.2.3/Microsoft.AspNet.WebApi.5.2.3.nupkg delete mode 100644 packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg delete mode 100644 packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll delete mode 100644 packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.xml delete mode 100644 packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll delete mode 100644 packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.xml delete mode 100644 packages/Microsoft.AspNet.WebApi.Core.5.2.3/Content/web.config.transform delete mode 100644 packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg delete mode 100644 packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll delete mode 100644 packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.xml delete mode 100644 packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg delete mode 100644 packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/lib/net45/System.Web.Http.WebHost.dll delete mode 100644 packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/lib/net45/System.Web.Http.WebHost.xml diff --git a/PollutometerWebApi.Tests/AqiCalculatorTests.cs b/PollutometerWebApi.Tests/AqiCalculatorTests.cs new file mode 100644 index 0000000..e84b687 --- /dev/null +++ b/PollutometerWebApi.Tests/AqiCalculatorTests.cs @@ -0,0 +1,51 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using PollutometerWebApi.Models; + +namespace PollutometerWebApi.Tests +{ + [TestClass()] + public class AqiCalculatorTests + { + [TestMethod()] + public void CalculateAqiPerfectTest() + { + var reading = new Reading + { + Co = 2.2, + No = 0.1, + So = 0.8 + }; + + var result = AqiCalculator.CalculateAqi(reading); + Assert.AreEqual(398.0100502512563, result.Value); + } + + [TestMethod()] + public void CalculateAqiBigNumbersTest() + { + var reading = new Reading + { + Co = 100.2, + No = 100.1, + So = 100.8 + }; + + var result = AqiCalculator.CalculateAqi(reading); + Assert.AreEqual(0, result.Value); + } + + [TestMethod()] + public void CalculateAqiZerosTest() + { + var reading = new Reading + { + Co = 0, + No = 0, + So = 0 + }; + + var result = AqiCalculator.CalculateAqi(reading); + Assert.AreEqual(0, result.Value); + } + } +} \ No newline at end of file diff --git a/PollutometerWebApi.Tests/EmailSenderTests.cs b/PollutometerWebApi.Tests/EmailSenderTests.cs new file mode 100644 index 0000000..427ec92 --- /dev/null +++ b/PollutometerWebApi.Tests/EmailSenderTests.cs @@ -0,0 +1,21 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using PollutometerWebApi.Models; + +namespace PollutometerWebApi.Tests +{ + [TestClass()] + public class EmailSenderTests + { + [TestMethod()] + public void SendEmailTest() + { + var aqi = new Aqi + { + GasName = "SO", + Value = 69, + Level = "Moderate" + }; + EmailSender.SendEmail(aqi); + } + } +} \ No newline at end of file diff --git a/PollutometerWebApi.Tests/PollutometerWebApi.Tests.csproj b/PollutometerWebApi.Tests/PollutometerWebApi.Tests.csproj index c27a06c..6ff37aa 100644 --- a/PollutometerWebApi.Tests/PollutometerWebApi.Tests.csproj +++ b/PollutometerWebApi.Tests/PollutometerWebApi.Tests.csproj @@ -1,39 +1,84 @@ - - + + + Debug AnyCPU - {D19CA1E0-796F-480A-996D-3DFABFC6203F} + {94A21C38-920E-42EF-8D48-B133D635EAFA} Library + Properties PollutometerWebApi.Tests PollutometerWebApi.Tests v4.6.2 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + true full false - bin\Debug - DEBUG; + bin\Debug\ + DEBUG;TRACE prompt 4 + pdbonly true - bin\Release + bin\Release\ + TRACE prompt 4 + + ..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + ..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + - - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.0\lib\net45\System.Net.Http.Formatting.dll + + + + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.0\lib\net45\System.Web.Http.dll + + + ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.0\lib\net45\System.Web.Http.WebHost.dll + + + + + + + + - + + + + + + @@ -42,5 +87,39 @@ PollutometerWebApi - + + + + + False + + + False + + + False + + + False + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/PollutometerWebApi.Tests/Properties/AssemblyInfo.cs b/PollutometerWebApi.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d6c3cc7 --- /dev/null +++ b/PollutometerWebApi.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("PollutometerWebApi.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PollutometerWebApi.Tests")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("94a21c38-920e-42ef-8d48-b133d635eafa")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/PollutometerWebApi.Tests/ReadingsControllerTests.cs b/PollutometerWebApi.Tests/ReadingsControllerTests.cs new file mode 100644 index 0000000..647649d --- /dev/null +++ b/PollutometerWebApi.Tests/ReadingsControllerTests.cs @@ -0,0 +1,116 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using PollutometerWebApi.Models; +using System; +using System.Collections.Generic; +using System.Web.Http.Results; + +namespace PollutometerWebApi.Controllers.Tests +{ + [TestClass()] + public class ReadingsControllerTests + { + ReadingsController controller = new ReadingsController(); + + [TestMethod()] + public void GetAllReadingsTest() + { + var actionResult = controller.GetAllReadings(); + var content = ((OkNegotiatedContentResult>)actionResult).Content; + Assert.IsTrue(content.Count >= 1); + } + + + [TestMethod()] + public void GetReadingTest() + { + var actionResult = controller.GetReading(0); + Assert.IsInstanceOfType(actionResult, typeof(OkNegotiatedContentResult)); + } + + [TestMethod()] + public void GetLatestReadingTest() + { + var actionResult = controller.GetLatestReading(); + var content = ((OkNegotiatedContentResult)actionResult).Content; + Assert.IsNotNull(content); + } + + [TestMethod()] + public void GetReadingsFromLastWeekTest() + { + var actionResult = controller.GetReadingsFromLastWeek(); + var content = ((OkNegotiatedContentResult>)actionResult).Content; + foreach(var reading in content) + { + var now = DateTimeOffset.Now.ToUnixTimeSeconds(); + Assert.IsTrue(reading.TimeStamp < now && reading.TimeStamp > now - 7*24*3600); + } + } + + [TestMethod()] + public void PostReadingPassTest() + { + var newReading = new Reading + { + TimeStamp = (int)DateTimeOffset.Now.ToUnixTimeSeconds(), + Co = 1.0, + No = 1.0, + So = 1.0 + }; + var actionResult = controller.PostReading(newReading); + var reading = controller.GetLatestReading(); + var content = ((OkNegotiatedContentResult)reading).Content; + Assert.AreEqual(newReading.TimeStamp, content.TimeStamp); + } + + [TestMethod()] + public void PostReadingFailTest() + { + var actionResult = controller.PostReading(null); + Assert.IsInstanceOfType(actionResult, typeof(BadRequestResult)); + } + + [TestMethod()] + public void PutReadingPassTest() + { + var latest = controller.GetLatestReading(); + var content = ((OkNegotiatedContentResult)latest).Content; + var actionResult = controller.PutReading(content.Id, + new Reading + { + TimeStamp = (int)DateTimeOffset.Now.ToUnixTimeSeconds(), + Co = 2.0, + No = 2.0, + So = 2.0 + } + ); + Assert.AreEqual(typeof(OkResult), actionResult.GetType()); + } + + [TestMethod()] + public void PutReadingFailTest() + { + var latest = controller.GetLatestReading(); + var content = ((OkNegotiatedContentResult)latest).Content; + var actionResult = controller.PutReading(content.Id, null); + Assert.AreEqual(typeof(BadRequestResult), actionResult.GetType()); + } + + [TestMethod()] + public void DeleteReadingPassTest() + { + var latest = controller.GetLatestReading(); + var content = ((OkNegotiatedContentResult)latest).Content; + var actionResult = controller.DeleteReading(content.Id); + var reading = controller.GetReading(content.Id); + Assert.IsInstanceOfType(reading, typeof(NotFoundResult)); + } + + [TestMethod()] + public void DeleteReadingFailTest() + { + var actionResult = controller.DeleteReading(1337); + Assert.IsInstanceOfType(actionResult, typeof(NotFoundResult)); + } + } +} \ No newline at end of file diff --git a/PollutometerWebApi.Tests/SqlOperatorTests.cs b/PollutometerWebApi.Tests/SqlOperatorTests.cs new file mode 100644 index 0000000..2930679 --- /dev/null +++ b/PollutometerWebApi.Tests/SqlOperatorTests.cs @@ -0,0 +1,68 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using PollutometerWebApi.Models; +using System; + +namespace PollutometerWebApi.Tests +{ + [TestClass()] + public class SqlOperatorTests + { + [TestMethod()] + public void GetReadingsTest() + { + var readings = SqlOperator.GetReadings("SELECT * FROM Readings"); + Assert.IsTrue(readings.Count >= 1); + } + + [TestMethod()] + public void PostReadingTest() + { + var newReading = new Reading + { + TimeStamp = (int)DateTimeOffset.Now.ToUnixTimeSeconds(), + Co = 0.0, + No = 0.0, + So = 0.0 + }; + SqlOperator.PostReading(newReading); + var command = "SELECT * FROM Readings " + + "WHERE TimeStamp IN(SELECT MAX(TimeStamp) FROM Readings)"; + var latestReading = SqlOperator.GetReadings(command)[0]; + var command2 = $"SELECT * FROM Readings WHERE Id={latestReading.Id}"; + var reading = SqlOperator.GetReadings(command2)[0]; + Assert.AreEqual(newReading.TimeStamp, reading.TimeStamp); + } + + [TestMethod()] + public void PutReadingTest() + { + var newReading = new Reading + { + TimeStamp = (int)DateTimeOffset.Now.ToUnixTimeSeconds(), + Co = 0.5, + No = 0.5, + So = 0.5 + + }; + var command = "SELECT * FROM Readings " + + "WHERE TimeStamp IN(SELECT MAX(TimeStamp) FROM Readings)"; + var latestReading = SqlOperator.GetReadings(command)[0]; + SqlOperator.PutReading(latestReading.Id, newReading); + var command2 = $"SELECT * FROM Readings WHERE Id={latestReading.Id}"; + var reading = SqlOperator.GetReadings(command2)[0]; + Assert.AreEqual(newReading.TimeStamp, reading.TimeStamp); + } + + [TestMethod()] + public void DeleteReadingTest() + { + var command = "SELECT * FROM Readings " + + "WHERE TimeStamp IN(SELECT MAX(TimeStamp) FROM Readings)"; + var latestReading = SqlOperator.GetReadings(command)[0]; + SqlOperator.DeleteReading(latestReading.Id); + var command2 = $"SELECT * FROM Readings WHERE Id={latestReading.Id}"; + var readings = SqlOperator.GetReadings(command2); + Assert.IsTrue(readings.Count == 0); + } + } +} \ No newline at end of file diff --git a/PollutometerWebApi.Tests/Test.cs b/PollutometerWebApi.Tests/Test.cs deleted file mode 100644 index abec015..0000000 --- a/PollutometerWebApi.Tests/Test.cs +++ /dev/null @@ -1,15 +0,0 @@ -using NUnit.Framework; -using System; -namespace PollutometerWebApi.Tests -{ - [TestFixture()] - public class Test - { - [Test()] - public void TestCase() - { - var result = AqiCalculator.CalculateAqi(new Models.Reading() {Co = 30.4, No = 1.0, So = 0.4}); - EmailSender.SendEmail(result); - } - } -} diff --git a/PollutometerWebApi.Tests/app.config b/PollutometerWebApi.Tests/app.config new file mode 100644 index 0000000..4429813 --- /dev/null +++ b/PollutometerWebApi.Tests/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/PollutometerWebApi.Tests/bin/Debug/Microsoft.Web.Infrastructure.dll b/PollutometerWebApi.Tests/bin/Debug/Microsoft.Web.Infrastructure.dll deleted file mode 100644 index 85f1138..0000000 Binary files a/PollutometerWebApi.Tests/bin/Debug/Microsoft.Web.Infrastructure.dll and /dev/null differ diff --git a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.dll b/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.dll deleted file mode 100644 index 29a96a6..0000000 Binary files a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.dll and /dev/null differ diff --git a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.pdb b/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.pdb deleted file mode 100644 index d4059a7..0000000 Binary files a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.Tests.pdb and /dev/null differ diff --git a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.dll b/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.dll deleted file mode 100644 index ebf4ce3..0000000 Binary files a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.dll and /dev/null differ diff --git a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.pdb b/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.pdb deleted file mode 100644 index ca309d7..0000000 Binary files a/PollutometerWebApi.Tests/bin/Debug/PollutometerWebApi.pdb and /dev/null differ diff --git a/PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.dll b/PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.dll deleted file mode 100644 index 859f67b..0000000 Binary files a/PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.dll and /dev/null differ diff --git a/PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.xml b/PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.xml deleted file mode 100644 index 1d57d2e..0000000 --- a/PollutometerWebApi.Tests/bin/Debug/System.Net.Http.Formatting.xml +++ /dev/null @@ -1,2094 +0,0 @@ - - - - System.Net.Http.Formatting - - - - - implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. The supports one or more byte ranges regardless of whether the ranges are consecutive or not. If there is only one range then a single partial response body containing a Content-Range header is generated. If there are more than one ranges then a multipart/byteranges response is generated where each body part contains a range indicated by the associated Content-Range header field. - - - - implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an is thrown indicating the valid Content-Range of the content. - The stream over which to generate a byte range view. - The range or ranges, typically obtained from the Range HTTP request header field. - The media type of the content stream. - - - - implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an is thrown indicating the valid Content-Range of the content. - The stream over which to generate a byte range view. - The range or ranges, typically obtained from the Range HTTP request header field. - The media type of the content stream. - The buffer size used when copying the content stream. - - - - implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an is thrown indicating the valid Content-Range of the content. - The stream over which to generate a byte range view. - The range or ranges, typically obtained from the Range HTTP request header field. - The media type of the content stream. - - - - implementation which provides a byte range view over a stream used to generate HTTP 206 (Partial Content) byte range responses. If none of the requested ranges overlap with the current extend of the selected resource represented by the content parameter then an is thrown indicating the valid Content-Range of the content. - The stream over which to generate a byte range view. - The range or ranges, typically obtained from the Range HTTP request header field. - The media type of the content stream. - The buffer size used when copying the content stream. - - - Releases the resources used by the current instance of the class. - true to release managed and unmanaged resources; false to release only unmanaged resources. - - - Asynchronously serialize and write the byte range to an HTTP content stream. - The task object representing the asynchronous operation. - The target stream. - Information about the transport. - - - Determines whether a byte array has a valid length in bytes. - true if length is a valid length; otherwise, false. - The length in bytes of the byte array. - - - Extension methods that aid in making formatted requests using . - - - - - - - - - Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as JSON. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The type of value. - - - Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as JSON. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - - - - - - - Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as XML. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The type of value. - - - Sends a POST request as an asynchronous operation to the specified Uri with the given value serialized as XML. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - - - - - - - - - - - - - - - - Sends a POST request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The type of value. - - - Sends a POST request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The authoritative value of the request's content's Content-Type header. Can be null in which case the <paramref name="formatter">formatter's</paramref> default content type will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - Sends a POST request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The authoritative value of the request's content's Content-Type header. Can be null in which case the <paramref name="formatter">formatter's</paramref> default content type will be used. - The type of value. - - - Sends a POST request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The authoritative value of the request's content's Content-Type header. Can be null in which case the <paramref name="formatter">formatter's</paramref> default content type will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - Sends a POST request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - - - - - - - Sends a PUT request as an asynchronous operation to the specified Uri with the given value serialized as JSON. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The type of value. - - - Sends a PUT request as an asynchronous operation to the specified Uri with the given value serialized as JSON. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - - - - - - - Sends a PUT request as an asynchronous operation to the specified Uri with the given value serialized as XML. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The type of value. - - - Sends a PUT request as an asynchronous operation to the specified Uri with the given value serialized as XML. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - - - - - - - - - - - - - - - - Sends a PUT request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The type of value. - - - Sends a PUT request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The authoritative value of the request's content's Content-Type header. Can be null in which case the <paramref name="formatter">formatter's</paramref> default content type will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - Sends a PUT request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The authoritative value of the request's content's Content-Type header. Can be null in which case the <paramref name="formatter">formatter's</paramref> default content type will be used. - The type of value. - - - Sends a PUT request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - The authoritative value of the request's content's Content-Type header. Can be null in which case the <paramref name="formatter">formatter's</paramref> default content type will be used. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - Sends a PUT request as an asynchronous operation to the specified Uri with value serialized using the given formatter. - A task object representing the asynchronous operation. - The client used to make the request. - The Uri the request is sent to. - The value that will be placed in the request's entity body. - The formatter used to serialize the value. - A cancellation token that can be used by other objects or threads to receive notice of cancellation. - The type of value. - - - Represents the factory for creating new instance of . - - - Creates a new instance of the . - A new instance of the . - The list of HTTP handler that delegates the processing of HTTP response messages to another handler. - - - Creates a new instance of the . - A new instance of the . - The inner handler which is responsible for processing the HTTP response messages. - The list of HTTP handler that delegates the processing of HTTP response messages to another handler. - - - Creates a new instance of the which should be pipelined. - A new instance of the which should be pipelined. - The inner handler which is responsible for processing the HTTP response messages. - The list of HTTP handler that delegates the processing of HTTP response messages to another handler. - - - Specifies extension methods to allow strongly typed objects to be read from HttpContent instances. - - - Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The collection of MediaTyepFormatter instances to use. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The collection of MediaTypeFormatter instances to use. - The IFormatterLogger to log events to. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The collection of MediaTypeFormatter instances to use. - The IFormatterLogger to log events to. - The token to cancel the operation. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type from the content instance. - An object instance of the specified type. - The HttpContent instance from which to read. - The collection of MediaTypeFormatter instances to use. - The token to cancel the operation. - The type of the object to read. - - - Returns a Task that will yield an object of the specified type from the content instance.