public void GetOrderByQuery_NullSortfieldsSpecified_DefaultSortExpected() { //Arrange List <PropertyInfo> properties = typeof(JobLog).GetProperties().ToList(); List <string> sortfields = null; var propertieslist = properties.Select(x => x.Name).ToList(); //Act var result = mQueryParser.GetOrderByQuery(properties, sortfields); //Assert Assert.IsNotNull(result); Assert.AreEqual("ORDER BY [SysLastModified] DESC", result); }