Example #1
0
        public void UpdateDictionarys_Test()
        {
            UsingDbContext(async ctx =>
            {
                //Arrange
                var Dictionary = new CreateDictionaryDto
                {
                    DicName     = "字典测试",
                    Description = "字典测试描述",
                };
                // Act
                var DictionaryResult1 = await _dictionaryAppService.Create(Dictionary);

                var DictionaryResult2 = await _dictionaryAppService.Update(DictionaryResult1);

                //Assert
                DictionaryResult1.ShouldNotBe(null);
                DictionaryResult2.ShouldNotBe(null);
                DictionaryResult1.Id.ShouldBe(DictionaryResult2.Id);
                DictionaryResult1.DicName.ShouldBe(DictionaryResult2.DicName);
                DictionaryResult1.Description.ShouldNotBe(DictionaryResult2.Description);
            });
        }
 public Task <DictionaryDto> Update(Guid id, CreateOrUpdateDictionaryDto input)
 {
     return(_dictionaryAppService.Update(id, input));
 }