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

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

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

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

            // assert
            Assert.Equal("Type null", result);
        }
예제 #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);
        }
예제 #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);
 }