v1.3.0 Restructure Saxonite workspace and upgrade to .NET 10 (#1)
Move Saxonite’s projects into a dedicated `Workspace` folder and align the solution with .NET 10 and the current Common workspace. Update encryption integration, test project structure and coverage, and repository guidance and upgrade notes. - Relocate application and library projects while retaining Git rename history. - Split tests into Admin, Online, and Shared projects; add representative behavioral and serialization tests. - Update Common integration, application version, and repository documentation. Application version: 1.3.0 Reviewed-on: #1 Co-authored-by: andy <andy@sarand.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using NUnit.Framework;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
|
||||
namespace Saxonite.Net.Core.UnitTests.Data.Bus
|
||||
{
|
||||
//=======================================================================
|
||||
[TestFixture]
|
||||
public class SaxArticle_ContentData_Tester
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
[Test]
|
||||
public void ContentDataRoundTripsBodyAndImageSegments()
|
||||
{
|
||||
SaxArticle.ContentData content = new SaxArticle.ContentData();
|
||||
content.AddSegment().Body.Html = "<p>Fish & chips</p>";
|
||||
content.AddSegment().Image.ItemImageId = new SysId(123);
|
||||
|
||||
SaxArticle.ContentData restored = SaxArticle.ExtractContent(SaxArticle.GetContentData(content));
|
||||
|
||||
Assert.That(restored.Segments, Has.Count.EqualTo(2));
|
||||
Assert.That(restored.Segments[0].Body.Html, Is.EqualTo("<p>Fish & chips</p>"));
|
||||
Assert.That(SysId.ToLong(restored.Segments[1].Image.ItemImageId), Is.EqualTo(123));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[Test]
|
||||
public void ContentDataOmitsInvalidSegments()
|
||||
{
|
||||
SaxArticle.ContentData content = new SaxArticle.ContentData();
|
||||
content.AddSegment();
|
||||
content.AddSegment().Body.Html = "<p>Valid</p>";
|
||||
|
||||
SaxArticle.ContentData restored = SaxArticle.ExtractContent(SaxArticle.GetContentData(content));
|
||||
|
||||
Assert.That(restored.Segments, Has.Count.EqualTo(1));
|
||||
Assert.That(restored.Segments[0].Body.Html, Is.EqualTo("<p>Valid</p>"));
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user