GetByName() public method

Method calls on repository for a specific category from the database based on name.
public GetByName ( string categoryName ) : CategoryDTO
categoryName string The name of the category to retrieve.
return openTill.Domain.DTO.CategoryDTO
        public void TestGetNameEquality()
        {
            Mock<ICategoryRepository> mock = new Mock<ICategoryRepository>();
            CategoryService cs = new CategoryService(mock.Object);
            CategoryService cs1 = new CategoryService(mock.Object);

            Assert.AreEqual(cs.GetByName("Sarah"), cs1.GetByName("Sarah"));
        }
 public void TestCategoryServiceGetByNameForNullReference()
 {
     CategoryService bs = new CategoryService(null);
     bs.GetByName(null);
 }