public void BuildEmail_TemplateExists_NoVariables_ReturnsEmailWithTemplateContent()
        {
            // Arrange
            var emailDefinition = new EmailDefinition("Template1.txt");

            // Act
            var sendableEmail = emailBuilder.BuildEmail(emailDefinition);

            // Assert
            sendableEmail.PlainText.Should().Be(GetTemplateContent(emailDefinition.TemplateFilename));
        }
        public void BuildEmail_TemplateDoesNotExist_ShouldErrorWithFileNotFound()
        {
            // Arrange
            var emailDefinition = new EmailDefinition("Filethatdoesntexist.txt");

            // Act
            Action action = () => emailBuilder.BuildEmail(emailDefinition);

            // Assert
            action.ShouldThrow<FileNotFoundException>();
        }
 public SendableEmail BuildEmail(EmailDefinition emailDefinition)
 {
     return new SendableEmail { PlainText = GetTemplateContent(emailDefinition.TemplateFilename)};
 }