Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Testing with f#
  • Table Of Contents Toc
  • Feedback & Rating feedback
Testing with f#

Testing with f#

By : Mikael Lundin
3.7 (3)
close
close
Testing with f#

Testing with f#

3.7 (3)
By: Mikael Lundin

Overview of this book

If you are a developer who wants to test applications using F#, this is the book for you. Basic experience of testing and intermediate experience of functional programming in F# is expected.
Table of Contents (12 chapters)
close
close
11
Index

Setting up and tearing down databases

When you're working in a greenfield project and have a favorable situation of designing a database from the ground up, you have complete control over your database when it comes to integration tests, if you do it correctly.

While working on a greenfield project where database development is part of the project, you should adopt fluent migrations as a part of the development cycle. Writing change scripts for database changes has been around for a very long time, but it was Ruby on Rails that popularized migrations as a part of the software development lifecycle, and this has been adopted by .NET in the FluentMigrator library.

Let's start by adding a reference to the FluentMigrator library in our project:

Setting up and tearing down databases

Now we can write our first migration:

open FluentMigrator

type Email = { FromAddress : string; ToAddress : string; Subject : string; Body : string }

[<Migration(1L)>]
type CreateEmailTable () =
    inherit Migration()

    let tableName...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Testing with f#
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon