Update to latest packages and show examples
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
using AwesomeAssertions;
|
||||
using GerstITS.Examples.Logic.Customers;
|
||||
using GerstITS.Examples.Logic.Customers.Customizations;
|
||||
using GerstITS.System.Customizations;
|
||||
using GerstITS.TestFramework;
|
||||
using Xunit;
|
||||
|
||||
namespace GerstITS.Examples.Tests.Customers.Customizations;
|
||||
|
||||
[TestCategory(TestCategories.Unit)]
|
||||
public sealed class CustomerDisplayNameCustomizationTest
|
||||
{
|
||||
#region Tests
|
||||
|
||||
[Fact]
|
||||
public void If_a_customer_is_customized___The_display_name_is_composed()
|
||||
{
|
||||
ICustomization customization = new CustomerDisplayNameCustomization();
|
||||
var customer = new Customer { FirstName = "Erika", LastName = "Mustermann" };
|
||||
|
||||
var customized = customization.Customize(customer, null);
|
||||
|
||||
customized.DisplayName.Should().Be("Mustermann, Erika");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void If_the_customer_is_null___It_cannot_be_customized()
|
||||
{
|
||||
ICustomization customization = new CustomerDisplayNameCustomization();
|
||||
|
||||
customization.CanCustomize<Customer>(null, null).Should().BeFalse();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user