Exemple #1
0
        public void TooManyFilesNullObject()
        {
            // arrange
            var sut = new Service();

            // act
            var result = sut.TooManyFiles(null) as HttpResult;

            // assert
            Assert.NotNull(result);
            Assert.Equal(HttpStatusCode.NotFound, result.StatusCode);
            Assert.Equal("Too many files with id ''", result.Response);
        }
Exemple #2
0
        public void TooManyFilesWorksProperly()
        {
            // arrange
            var sut = new Service();
            const string Parameter = "IdFile '123'";

            // act
            var result = sut.TooManyFiles(Parameter) as HttpResult;

            // assert
            Assert.NotNull(result);
            Assert.Equal(HttpStatusCode.NotFound, result.StatusCode);
            Assert.Equal(string.Format("Too many files with id '{0}'", Parameter), result.Response);
        }