Beispiel #1
0
        public void FileTypeMapping()
        {
            // arrange
            var fileByTypeRequest = new FileByType { Type = "SRF" };

            // act
            FileType result = fileByTypeRequest.ToDto();

            // assert
            Assert.Equal(fileByTypeRequest.Type, result.Id);
        }
Beispiel #2
0
        public void ToStringWithNullParameter()
        {
            // arrange
            var sut = new FileByType();

            // act
            string result = sut.ToString();

            // assert
            Assert.Equal("Type null", result);
        }
Beispiel #3
0
        public void ToStringWithValue()
        {
            // arrange
            const string Type = "SRF";
            var sut = new FileByType { Type = Type };

            // act
            string result = sut.ToString();

            // assert
            Assert.Equal(string.Format("Type: '{0}'", Type), result);
        }
Beispiel #4
0
 /// <summary>
 /// The get.
 /// </summary>
 /// <param name="request">
 /// The request.
 /// </param>
 /// <returns>
 /// The <see cref="object"/>.
 /// </returns>
 public object Get(FileByType request)
 {
     var criteria = new FindFileByType(request.Type);
     return this.CreateResponseForFilesByCriteria(request, criteria);
 }