Beispiel #1
0
        public async Task EditShouldReturnCorrectResults()
        {
            // Arrange
            var photoService = new PhotoService(this.db);

            // Act
            var result = await photoService.Edit(1, "newDescription", "newLocation", "newLatitude", "newLongitude", "");

            var secondResult = await photoService.FindForEdit(1);

            // Assert
            result.Should().Be(true);

            secondResult.Should().BeOfType <EditPhotoServiceModel>().Subject.Description.Should().Be("newDescription");
            secondResult.Should().BeOfType <EditPhotoServiceModel>().Subject.Location.Should().Be("newLocation");
            secondResult.Should().BeOfType <EditPhotoServiceModel>().Subject.Latitude.Should().Be("newLatitude");
            secondResult.Should().BeOfType <EditPhotoServiceModel>().Subject.Longitude.Should().Be("newLongitude");

            secondResult.Should().BeOfType <EditPhotoServiceModel>().Subject.Tags.Should().HaveCount(0);
        }