本文整理汇总了C#中ModelHelper.CreateAatfDeliveryLocation方法的典型用法代码示例。如果您正苦于以下问题:C# ModelHelper.CreateAatfDeliveryLocation方法的具体用法?C# ModelHelper.CreateAatfDeliveryLocation怎么用?C# ModelHelper.CreateAatfDeliveryLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelHelper
的用法示例。
在下文中一共展示了ModelHelper.CreateAatfDeliveryLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetOrAddAatfDeliveryLocation_ReturnsAatfDeliveryLocation_ForMatchingFacilityName
public async Task GetOrAddAatfDeliveryLocation_ReturnsAatfDeliveryLocation_ForMatchingFacilityName()
{
using (DatabaseWrapper database = new DatabaseWrapper())
{
// Arrange
ModelHelper helper = new ModelHelper(database.Model);
helper.CreateAatfDeliveryLocation("APR", "Facility Name1");
var location = helper.CreateAatfDeliveryLocation("APR", "Facility Name2");
database.Model.SaveChanges();
var dataAccess = new DataReturnVersionBuilderDataAccess(A.Dummy<Domain.Scheme.Scheme>(), A.Dummy<Quarter>(), database.WeeeContext);
// Act
var result = await dataAccess.GetOrAddAatfDeliveryLocation("APR", "Facility Name2");
// Assert
Assert.NotNull(result);
Assert.Equal("Facility Name2", result.FacilityName);
Assert.Equal(location.Id, result.Id);
}
}