Files
speckle-sharp-sdk/tests/Speckle.Sdk.Tests.Unit/Models/Extensions/ExceptionTests.cs
T
Adam Hathcock 6f5f044095 Adam/cxpla 6 kill remaining kit code in core (#59)
* compiles with relevant deletions

* Test fixes

* fix type loading

* type load for tests

* speckle objects renamespace

* rename Core to Sdk

* Fix test references

* tests renaming

* rename logging

* fmt

* start of adding an attribute to all base types

* convert all types and do basic test

* Fix most tests

* fix more tests

* fmt

* Build fix

* add changes and more tests

* Fix tests

* Fix integration tests
2024-08-08 10:52:19 +01:00

27 lines
673 B
C#

using NUnit.Framework;
using Speckle.Sdk.Models.Extensions;
namespace Speckle.Sdk.Tests.Unit.Models.Extensions;
[TestFixture]
[TestOf(typeof(BaseExtensions))]
public class ExceptionTests
{
[Test]
public void CanPrintAllInnerExceptions()
{
var ex = new Exception("Some error");
var exMsg = ex.ToFormattedString();
Assert.That(exMsg, Is.Not.Null);
var ex2 = new Exception("One or more errors occurred", ex);
var ex2Msg = ex2.ToFormattedString();
Assert.That(ex2Msg, Is.Not.Null);
var ex3 = new AggregateException("One or more errors occurred", ex2);
var ex3Msg = ex3.ToFormattedString();
Assert.That(ex3Msg, Is.Not.Null);
}
}