protected override string Execute(ICompany company, IFurniture furniture)
        {
            var resultFurniture = company.Find(furniture.Model);

            if (resultFurniture == null)
            {
                throw new ArgumentException(string.Format(Messages.FurnitureNotFoundErrorMessage, furniture.Model));
            }

            return(resultFurniture.ToString());
        }
コード例 #2
0
 public void ThrowArgumentNullException_When_PassedNull()
 {
     Assert.That(() => company.Find(null), Throws.ArgumentNullException);
 }