-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved Unknown Assembly Experience/Messaging (#559)
- Loading branch information
1 parent
9d16a89
commit c341ecf
Showing
2 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
test/ExtendedXmlSerializer.Tests.ReportedIssues/Issue558Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using ExtendedXmlSerializer.Configuration; | ||
using ExtendedXmlSerializer.Tests.ReportedIssues.Support; | ||
using FluentAssertions; | ||
using System; | ||
using Xunit; | ||
|
||
namespace ExtendedXmlSerializer.Tests.ReportedIssues | ||
{ | ||
public sealed class Issue558Tests | ||
{ | ||
[Fact] | ||
public void Verify() | ||
{ | ||
var subject = new ConfigurationContainer().Create().ForTesting(); | ||
|
||
const string document = | ||
@"<?xml version=""1.0"" encoding=""utf-8""?><Issue558Tests-Subject xmlns=""clr-namespace:ExtendedXmlSerializer.Tests.ReportedIssues;assembly=ExtendedXmlSerializer.Tests.ReportedIssues.DoesNotExist"" />"; | ||
|
||
subject.Invoking(x => x.Deserialize<Subject>(document)) | ||
.Should() | ||
.ThrowExactly<InvalidOperationException>() | ||
.WithMessage("Could not load assembly 'ExtendedXmlSerializer.Tests.ReportedIssues.DoesNotExist'. Are you sure it exists?"); | ||
} | ||
|
||
sealed class Subject {} | ||
} | ||
} |