Beispiel #1
0
        public void ToStringWithNullParameter()
        {
            // arrange
            var sut = new FileById();

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

            // assert
            Assert.Equal("Id null", result);
        }
Beispiel #2
0
        public void ToStringWithValue()
        {
            // arrange
            var id = Guid.NewGuid();
            var sut = new FileById { IdFile = id };

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

            // assert
            Assert.Equal(string.Format("Id: '{0}'", id), result);
        }
Beispiel #3
0
 /// <summary>
 /// The get.
 /// </summary>
 /// <param name="request">
 /// The request.
 /// </param>
 /// <returns>
 /// The <see cref="object"/>.
 /// </returns>
 public object Get(FileById request)
 {
     var criteria = new FindFileById(request.IdFile);
     return this.CreateResponseForSingleFileByCriteria(request, criteria);
 }