示例#1
0
        public async Task GetAsync()
        {
            // Act
            ClubDto result = await _clubsAppService.GetAsync(Guid.Parse("d772238a-9871-47d7-84d5-c45083799954"));

            // Assert
            result.ShouldNotBeNull();
            result.Id.ShouldBe(Guid.Parse("d772238a-9871-47d7-84d5-c45083799954"));
        }
示例#2
0
        public async Task CreateAsync()
        {
            // Arrange
            ClubCreateDto input = new ClubCreateDto
            {
                Name = "bba11c3003ac4085a238b470f78c262d18e0a974712a4fd4a3bd405ba7521daadb7473f92d85418fb1acb8bc81880207ebf2"
            };

            // Act
            ClubDto serviceResult = await _clubsAppService.CreateAsync(input);

            // Assert
            Club result = await _clubRepository.FindAsync(x => x.Id == serviceResult.Id);

            result.ShouldNotBe(null);
            result.Name.ShouldBe("bba11c3003ac4085a238b470f78c262d18e0a974712a4fd4a3bd405ba7521daadb7473f92d85418fb1acb8bc81880207ebf2");
        }
示例#3
0
        public async Task UpdateAsync()
        {
            // Arrange
            ClubUpdateDto input = new ClubUpdateDto()
            {
                Name = "143871a4e4294ced94757d8ba4e861f2ab712c1241e24d058540666876d7289b02b17a8cc7d3431ab37381fa6923f624de67"
            };

            // Act
            ClubDto serviceResult = await _clubsAppService.UpdateAsync(Guid.Parse("d772238a-9871-47d7-84d5-c45083799954"), input);

            // Assert
            Club result = await _clubRepository.FindAsync(x => x.Id == serviceResult.Id);

            result.ShouldNotBe(null);
            result.Name.ShouldBe("143871a4e4294ced94757d8ba4e861f2ab712c1241e24d058540666876d7289b02b17a8cc7d3431ab37381fa6923f624de67");
        }