refactor(configmanager): rename UI project and split test projects
Rename ConfigManager to ConfigManager.Ui to match the Core/CLI/UI project structure, and split the monolithic test project into Core.Tests, Cli.Tests, and Ui.Tests to align with the source project organization.
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
using JdeScoping.ConfigManager.Core.Models;
|
||||
using JdeScoping.ConfigManager.Ui.ViewModels.Forms;
|
||||
|
||||
namespace JdeScoping.ConfigManager.Ui.Tests.ViewModels.Forms;
|
||||
|
||||
public class DataAccessFormViewModelTests
|
||||
{
|
||||
[Fact]
|
||||
public void Constructor_InitializesFromModel()
|
||||
{
|
||||
// Arrange
|
||||
var model = new DataAccessSection
|
||||
{
|
||||
DefaultTimeoutSeconds = 60,
|
||||
ProductionSchema = "dbo",
|
||||
EnableDetailedLogging = true
|
||||
};
|
||||
|
||||
// Act
|
||||
var sut = new DataAccessFormViewModel(model, () => { });
|
||||
|
||||
// Assert
|
||||
sut.DefaultTimeoutSeconds.ShouldBe(60);
|
||||
sut.ProductionSchema.ShouldBe("dbo");
|
||||
sut.EnableDetailedLogging.ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PropertyChange_UpdatesModelAndInvokesOnChanged()
|
||||
{
|
||||
// Arrange
|
||||
var model = new DataAccessSection();
|
||||
var changedInvoked = false;
|
||||
var sut = new DataAccessFormViewModel(model, () => changedInvoked = true);
|
||||
|
||||
// Act
|
||||
sut.ArchiveSchema = "hist";
|
||||
|
||||
// Assert
|
||||
model.ArchiveSchema.ShouldBe("hist");
|
||||
changedInvoked.ShouldBeTrue();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user