public void AddHelperFunction_GivenNullFunction_Ignores() { var sut = new RazorJSTemplateBuilder(this._templateCollection.Object, this._helperCollection.Object); sut.AddHelperFunction(null); this._helperCollection.Verify(h => h.Add(It.IsAny <HelperFunction>()), Times.Never()); }
public void AddHelperFunction_GivenFunction_AddsToCollection() { HelperFunction input = new HelperFunction("test", "alert('test');"); var sut = new RazorJSTemplateBuilder(this._templateCollection.Object, this._helperCollection.Object); sut.AddHelperFunction(input); this._helperCollection.Verify(h => h.Add(input)); }