public void Ctor_EmptyRecipients_Exception(IReadOnlyCollection <string> recipients, IReadOnlyCollection <string> cc) { var email = new NoReplyEmailStub( recipients, cc, subject: "Awesome subject", viewPath: "viewPath", renderer: new ViewRendererFake()); Assert.Throws <InvalidOperationException>(() => email.ThrowIfInvalid()); }
public void ThrowIfInvalid_InvalidViewPathAndSubject_Exception(string subject, string viewPath) { var t = new NoReplyEmailStub( recipients: new[] { ValidEmail }, cc: null, subject: subject, viewPath: viewPath, renderer: new ViewRendererFake()); Assert.Throws <ArgumentNullException>(() => t.ThrowIfInvalid()); }