Learn how to write a trivial NUnit unit test and execute it in NCrunch.
- [Instructor] I'm just going to comment out this open for now,…because that's a thing that shouldn't exist.…And we're going to think about how we're going to write tests.…A common way of doing this is to declare a type,…and you might remember from the previous module,…that you can just give a type a class name.…So it could be something like that.…But that's not very useful for testing.…It would be quite nice if we could name our test…in English, and you certainly can.…You just surround any identifier in F# with backticks,…and then you can use spaces in the names and stuff.…
Every type declaration of this kind needs…some constructive parameters, even if that's an empty list.…And then we say equals, and then the individual tests…are going to be methods within that type.…So as always, with NUnit, we've put an attribute on them…called Test, then you declare the member of a class type…in F# with member, this. and then we need a name…for the test. And once again,…backticks and you can have a whole sentence.…
Now I'm not construvating at all on the actual functionality…
- Defining values and calling functions in F#
- Defining and identifying discriminated unions
- Working with if-else expressions
- Writing unit test
- Using type providers to access data
- Analyzing data with collection functions
- Plotting data using the R type provider
- Using railway-oriented programming to handle errors
- Integrating with Twitter
- Deploying an F# application to Azure
Skill Level Intermediate
1. Get Started with F#
2. Build a Simple Parser with Unit Testing
3. Use F# CSV Type Provider to Get Data
4. Analyze Data with F# Collection Functions
5. Use RStats Provider and ggplot2 to Plot Data
6. Use BoxKite with Twitter
7. Deploy a Working Bot
Next steps1m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.