Commit 938b0eb3 authored by Andreas Müller's avatar Andreas Müller
Browse files

Moving Exceptions to own sub-namespace "Exceptions"

parent 7b255715
using System;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace AMWD.Net.Api.PowerAlarm.Test
......
......@@ -7,6 +7,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Enums;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using AMWD.Net.Api.PowerAlarm.Models;
using AMWD.Net.Api.PowerAlarm.Requests;
using AMWD.Net.Api.PowerAlarm.Responses;
......
......@@ -4,6 +4,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using AMWD.Net.Api.PowerAlarm.Models;
using AMWD.Net.Api.PowerAlarm.Requests;
using AMWD.Net.Api.PowerAlarm.Responses;
......@@ -115,7 +116,7 @@ namespace AMWD.Net.Api.PowerAlarm.Test
// arrange
string apikey = "abc";
httpResponseMessage.StatusCode = HttpStatusCode.NotFound;
var request = new CreateGroupAlarmRequest
{
GroupId = "GR01",
......
......@@ -3,6 +3,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using AMWD.Net.Api.PowerAlarm.Responses;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
......
......@@ -3,6 +3,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using AMWD.Net.Api.PowerAlarm.Responses;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
......
......@@ -3,6 +3,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using AMWD.Net.Api.PowerAlarm.Responses;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
......
......@@ -4,6 +4,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using AMWD.Net.Api.PowerAlarm.Requests;
using AMWD.Net.Api.PowerAlarm.Responses;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......
......@@ -19,7 +19,7 @@
<PackageId>AMWD.Net.Api.PowerAlarm</PackageId>
<PackageIcon>package-icon.png</PackageIcon>
<PackageProjectUrl>https://am-wd.de/</PackageProjectUrl>
<PackageProjectUrl>https://poweralarm.de/</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://gitlab.com/blackpanther/poweralarm-api.git</RepositoryUrl>
......
using System;
using System.Runtime.Serialization;
namespace AMWD.Net.Api.PowerAlarm
namespace AMWD.Net.Api.PowerAlarm.Exceptions
{
/// <summary>
/// Represents an error with the api key.
......
using System;
using System.Runtime.Serialization;
namespace AMWD.Net.Api.PowerAlarm
namespace AMWD.Net.Api.PowerAlarm.Exceptions
{
/// <summary>
/// Represents an error by PowerAlarm.
......
......@@ -4,6 +4,7 @@ using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using AMWD.Net.Api.PowerAlarm.Exceptions;
using AMWD.Net.Api.PowerAlarm.Models;
using AMWD.Net.Api.PowerAlarm.Requests;
using AMWD.Net.Api.PowerAlarm.Responses;
......@@ -247,7 +248,7 @@ namespace AMWD.Net.Api.PowerAlarm
throw new ObjectDisposedException(GetType().FullName);
if (string.IsNullOrWhiteSpace(ApiKey))
throw new ApiKeyException("The api key is missing");
throw new ApiKeyException("The API key is required");
}
#endregion IDisposable implementation
......
......@@ -5,7 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://git.am-wd.de/andreasmueller/poweralarm-api/compare/v1.0.1...main) - 0000-00-00
_nothing for now_
### Changed
- Own Namespace for Exceptions: `AMWD.Net.Api.PowerAlarm.Exceptions`
## [v1.0.1](https://git.am-wd.de/andreasmueller/poweralarm-api/compare/v1.0.0...v1.0.1) - 2022-01-10
### Added
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment