Ingraham, J.:
The action was brought to foreclose a mortgage to secure the payment of a bond executed on the 31st day of May, 1893, the Foskett & Bishop Company, a corporation organized under the laws of the State of Connecticut, being the mortgagee. On the 12th day of June, 1893, the corporation (the mortgagee) assigned the bond and mortgage to this plaintiff, who thereupon became and continued to be, down to the trial of the action, the owner and holder thereof. The defendants in their answer admit the making of *191the bond and mortgage, but set up for a further and separate defense, and as and for a counterclaim, the fact that the mortgage was given to the said corporation in payment of the contract price of a hot water heating apparatus. The defendant alleged that by an agreement between the firm of Foskett & Bishop and the defendant Patrick Hogan the said Foskett & Bishop agreed to furnish and erect in certain buildings situated on the southwesterly corner of One Hundred and Forty-second street and Seventh avenue, in the city of New York, the said hot water heating apparatus; that by the said agreement the said Foskett & Bishop guaranteed that the said apparatus should heat the said premises satisfactorily wherever in said premises radiators were placed, but that the said apparatus was and is imperfect and has failed to heat said premises as guaranteed ; that the said Foskett & Bishop or the said Foskett & Bishop Company promised and agreed to remedy the defects in said apparatus, and requested this defendant or her said husband to execute and deliver a bond and mortgage as provided for in said contract ; that thereupon the bond and mortgage mentioned in the complaint was executed and delivered to the said Foskett & Bishop or the said Foskett & Bishop Company in consideration of said agreement for the furnishing of said hot water heating apparatus and said guaranty, and for no other consideration whatsoever; that the said guaranty was, before the commencement of this action, broken and violated, and that this defendant has sustained damage in the sum of $3,000. And the defendant demanded judgment that the complaint be dismissed and that she recover $3,000 from the plaintiff.
The original contract was made between these defendants Patrick Hogan and Foskett & Bishop, the defendant Bridget Hogan guaranteeing the contract. Subsequently the bond and mortgage in question was executed by the defendants to the Foskett & Bishop Company, a corporation organized under the laws of the State of Connecticut. It appeared that, between the making of the contract and the execution of the mortgage to the corporation, the firm of Foskett & Bishop assigned and transferred to the said corporation the stock in trade, fixtures and all other property owned and used in the manufacture and sale of steam traps, etc., the business in which said firm was engaged, together with all book accounts and other *192debts due to said vendors by reason of their said business, and also, the good will of said business, said corporation assuming and agreeing to pay all accounts due from and owing by said purchasers in their said business to all persons whatsoever, this assignment being dated March 20, 1893. Subsequent to this assignment to the corporation the defendants executed the bond and mortgage in question to the corporation. By the contract between the copartnership of Foskett & Bishop and these defendants it was provided, that “ when the apparatus herein proposed to be furnished is completed in accordance with the conditions hereof, we guarantee that it shall be capable of warming all rooms mentioned in the schedule to the' temperature mentioned therein, when the outside temperature is at zero, provided our printed instructions for the management of the heater are followed, and that good coal of suitable size is used satisfactory where radiators go.
“ If, after this apparatus shall have been accepted by you, any part thereof, constructed by us under this proposal, shall fail to accomplish the guarantee herein contained, by reason of any defect in the same, we agree to remedy such defect at our own cost, within a reasonable time after receiving written notice of such defect.”
In a copy of the proposals and specifications produced by the defendants, which appear to have been submitted to the defendants by Foskett & Bishop, but not signed by the defendants, after the words. “ good coal of suitable size ” in the guaranty, appear the words “heating satisfactory where radiators go,” the word “heating” being added to the words contained in the specifications to which the contract signed by the defendants had been annexed. The defendants testified that after the work had been completed the corporation applied for the bond and mortgage, the consideration for the work done, in answer to which application the defendant said :
“ Now, we haven’t had any chance to try this. How will it be if it does not work satisfactorily ? He said (meaning the plaintiff, who was the manager of the corporation), ‘You have had no trouble in 128th street, and it is not likely you will have any here, and if you do, of course we will attend to it.’ ” That was in May, 1893, and subsequent to that conversation the bond and mortgage in question was executed and delivered to the corporation; and subsequently, and on the 12th day of June, 1893, it was *193assigned to the plaintiff. This conversation, was denied by Mr. Raymond. He testified that nothing was said about the apparatus not being satisfactory, at the time of the execution of the mortgage ; but however that might be, neither of the defendants then made any objection to the sufficiency of the heating apparatus, no claim was then made that the contract had not been satisfactorily complied with by the corporation, and no notice that the apparatus was out of order was given by the defendants until the winter of 1894 and 1895. In June, 1893, the mortgage in question was duly assigned and transferred to the plaintiff, and on the 20th of July, 1894, an agreement was executed between the defendant Bridget Hogan and the plaintiff, wherein the assignment by said corporation to the plaintiff of the said mortgage, and the ownership by the defendant Bridget Hogan of the premises covered by the mortgage, are recited and provide for an extension of the time for the payment of the mortgage, upon condition that the defendant Bridget Hogan should pay all arrears of interest upon the first mortgage and all taxes upon the property, and should, upon the first day of each month, ]iay fifty dollars on account of the principal. “ But if the party of the first part shall not perform each and every of the conditions above specified, then the principal sum of said bond and mortgage shall forthwith become due and payable without notice or demand.” Thus, before any notice had been given to the firm of Foskett & Bishop, or to the corporation who had succeeded to that firm, that the said heating apparatus was not in all respects satisfactory and a full compliance with the contract, this mortgage had been assigned to the plaintiff by the mortgagee, and for a valuable consideration the defendants had agreed to pay the mortgage to the plaintiff. At the time of the assignment to plaintiff and this agreement between the defendants and the plaintiff, no counterclaim existed in favor of either of the defendants against either the plaintiff, Foskett & Bishop, or the corporation. The apparatus had been accepted, and by the contract, if after its acceptance it should fail to accomplish the result by reason of any defect in the same, the firm of Foskett & Bishop agreed to remedy such defect within a reasonable time after receiving written notice of the defect. That was the guaranty, and it was that obligation, if any, that the corporation *194assumed. No obligation existed on the part of the firm of Foskett & Bishop, or the corporation under this agreement of guaranty, until written notice of the defect had been given to the firm or corporation, and then the contractors were bound to repair any defect, and if they failed, Foskett & Bishop, or the corporation, would be liable for such damage as has been caused in consequence of their refusal to make such repairs or changes as would make the work conform to the contract. No such cause of action existed in favor of the defendants against the corporation when this mortgage was assigned to the plaintiff; and when the defendants agreed to pay to the plaintiff the amount due on the mortgage there was no cause of action existing in favor of the defendants that could be pleaded in an action to foreclose the bond and mortgage as an offset to the amount due to the plaintiff thereon.
By subdivision 1 of section 502 of the Code of Civil Procedure it is provided that “ if the action is founded upon a contract, which has been assigned by the party thereto, other than a 'negotiable promissory note or bill of exchange, a demand, existing against the party thereto, or an assignee of the contract, at the time of the assignment thereof, and belonging to the defendant, in good faith, before notice of the assignment, must be allowed as a counterclaim, to the amount of the plaintiff’s demand, if it might have been so allowed against the party, or the assignee, while the contract belonged to him.” This alleged cause of action against Foskett & Bishop or the corporation, not existing against such corporation or firm at the time of the assignment of the bond and mortgage, the contract upon which the action is founded cannot be allowed as a counterclaim to the amount of the plaintiff’s demand.
The judgment below was, therefore, entirely right in dismissing the counterclaim, and it should be affirmed, with costs.
Van Brunt, P. J., Barrett, Rumsey and O’Brien, JJ., .concurred.
Judgment affirmed, with costs.