<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Bdd on BradCypert.com</title>
    <link>https://www.bradcypert.com/tags/bdd/</link>
    <description>Recent content in Bdd on BradCypert.com</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 27 Dec 2022 16:51:00 -0500</lastBuildDate>
    <atom:link href="https://www.bradcypert.com/tags/bdd/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>BDD Assertions with Expekt for Kotlin</title>
      <link>https://www.bradcypert.com/bdd-assertions-expekt-kotlin/</link>
      <pubDate>Fri, 26 Oct 2018 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/bdd-assertions-expekt-kotlin/</guid>
      <description>&lt;p&gt;Behavior-Driven Development (BDD) has became quite a popular strategy for writing tests in the past ten or so years. BDD is a style of test-writing that focuses on test cases that flow like natural English sentences. Expekt is one such library for writing JUnit assertions in Kotlin. Combining JUnit and Expekt you can achieve results like this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-kotlin&#34; data-lang=&#34;kotlin&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#50fa7b&#34;&gt;FormatterTest&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  @Test&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#ff79c6&#34;&gt;fun&lt;/span&gt; &lt;span style=&#34;color:#50fa7b&#34;&gt;shouldFormatFloatsWithADollarSignAndTwoDecimalPlaces&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#50fa7b&#34;&gt;Formatter&lt;/span&gt;.format(&lt;span style=&#34;color:#bd93f9&#34;&gt;1.2345&lt;/span&gt;).to.equal(&lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;$1.23&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;adding-expekt-to-your-project&#34;&gt;Adding Expekt to Your Project&lt;/h2&gt;&#xA;&lt;p&gt;As of writing, the current version of Expekt is &lt;code&gt;0.5.0&lt;/code&gt; so that’s the one we’ll include in our project. If you’re using Gradle, you can add the following to your dependency list in your build.gradle.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
