|
@@ -51,7 +51,7 @@ public class SnapshotBulletionApplicationTest : TestBase
|
|
|
public async Task Bulletin_Test()
|
|
|
{
|
|
|
SetWeiXin();
|
|
|
- var bulletinType = _systemDicDataCacheManager.SnapshotBulletinType.First();
|
|
|
+ var bulletinType = _systemDicDataCacheManager.SnapshotBulletinType.First(m => m.DicDataName == "安全卫士");
|
|
|
var safetyType = await _safetyTypeRepository.Queryable().FirstAsync();
|
|
|
var addRelationInDto = new AddCitizenRelationSafetyTypeInDto { SafetyTypeId = safetyType.Id, CitizenIds = [_sessionContext.UserId] };
|
|
|
await _snapshotUserApplication.AddCitizenRelationSafetyType(addRelationInDto, CancellationToken.None);
|
|
@@ -60,7 +60,7 @@ public class SnapshotBulletionApplicationTest : TestBase
|
|
|
Title = "测试公告" + DateTime.Now.ToLongDateTimeString(),
|
|
|
Content = "没什么内容",
|
|
|
BulletinTime = DateTime.Now,
|
|
|
- IsSnapshot = true,
|
|
|
+ Shape = Share.Enums.Snapshot.EBulletinShape.Video,
|
|
|
BulletinTypeId = bulletinType.DicDataValue,
|
|
|
BulletinTypeName = bulletinType.DicDataName,
|
|
|
SafetyTypeId = [safetyType.Id],
|
|
@@ -69,7 +69,7 @@ public class SnapshotBulletionApplicationTest : TestBase
|
|
|
};
|
|
|
var bulletinId = await _snapshotBulletinApplication.AddBulletinAsync(inDto, CancellationToken.None);
|
|
|
var bulletin = await _bulletinRepository.GetAsync(bulletinId);
|
|
|
- bulletin.IsSnapshot.ShouldBe(true);
|
|
|
+ bulletin.Shape.ShouldBe(Share.Enums.Snapshot.EBulletinShape.Video);
|
|
|
bulletin.SafetyTypeId.First().ShouldBe(safetyType.Id);
|
|
|
bulletin.VideoPath.ShouldBe(inDto.VideoPath);
|
|
|
bulletin.VideoCoverImgUrl.ShouldBe(inDto.VideoCoverImgUrl);
|