Exemplo n.º 1
0
        public async Task Handle_ShouldBeGetPhoto()
        {
            var query = new DownloadPhotoQuery
            {
                PhotoId = DefaultPhotoIds.First()
            };

            var handler = GetNewHandler();

            var result = await handler.Handle(query, CancellationToken.None);

            Assert.That(result.Name, IsNotNullOrEmpty);
            Assert.That(result.Path, IsNotNullOrEmpty);
        }
Exemplo n.º 2
0
        public async Task Handle_ShouldBeUpdateInfo()
        {
            var command = new UpdateInfoCommand
            {
                AvatarPhotoId = DefaultPhotoIds.First(),
                UserName      = "******"
            };

            var handler = GetNewHandler();

            var result = await handler.Handle(command, CancellationToken.None);

            Assert.AreEqual(command.AvatarPhotoId, result.AvatarPhotoId);
            Assert.AreEqual(command.UserName, result.UserName);
        }