I hereby claim:
- I am jbrains on github.
- I am jbrains (https://keybase.io/jbrains) on keybase.
- I have a public key ASCk97WjVrw0fVggW5H9CdXC92koHvo0GSQrdW6T1q0j4Qo
To claim this, I am signing this object:
checkSellMultipleItems :: Spec Unit | |
checkSellMultipleItems = | |
describe "Sell Multiple Items" do | |
it "happy path" do | |
(POS.handleCommand $ TextCommand "12345") `shouldSatisfy` (const true) | |
(POS.handleCommand $ TextCommand "total") `shouldEqual` "Total: CAD 27.50" |
package ca.jbrains.pos; | |
import ca.jbrains.pos.ui.TextProcessorAndCommandInterpreter; | |
import ca.jbrains.pos.ui.lcd.UdpPostOffice; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.HashMap; | |
public class VirtualPointOfSaleTerminal { | |
public static void main(String[] args) throws IOException { |
private String linesOf(List<String> lines) { | |
StringBuilder stringBuilder = new StringBuilder(); | |
lines.map(line -> stringBuilder.append(line).append(System.lineSeparator())); | |
return stringBuilder.toString(); | |
} |
import io.kotlintest.Description | |
import io.kotlintest.Spec | |
import io.kotlintest.extensions.TestListener | |
import io.kotlintest.shouldBe | |
import io.kotlintest.specs.FreeSpec | |
import org.jetbrains.exposed.dao.EntityID | |
import org.jetbrains.exposed.dao.IntEntity | |
import org.jetbrains.exposed.dao.IntEntityClass | |
import org.jetbrains.exposed.dao.IntIdTable | |
import org.jetbrains.exposed.sql.Database |
package ca.jbrains.org.freemarker; | |
import freemarker.template.Configuration; | |
import freemarker.template.Template; | |
import freemarker.template.TemplateException; | |
import io.vavr.collection.HashMap; | |
import io.vavr.collection.Map; | |
import org.junit.Assert; | |
import org.junit.Test; |
package ca.jbrains.java.test; | |
import ca.jbrains.java.ReaderBasedTextSource; | |
import io.vavr.collection.List; | |
import io.vavr.collection.Stream; | |
import org.hamcrest.Description; | |
import org.hamcrest.Factory; | |
import org.hamcrest.Matcher; | |
import org.hamcrest.TypeSafeMatcher; | |
import org.junit.Assert; |
public static int factorsOfFiveIn(int n) { | |
int factorsOfFive = 0; | |
while (n > 1) { | |
if (n % 5 == 0) factorsOfFive++; | |
n /= 5; | |
} | |
return factorsOfFive; | |
} |
using System.Collections.Generic; | |
using System.Linq; | |
using NUnit.Framework; | |
//Using Maybe.cs | |
namespace ArrayStructure | |
{ | |
[TestFixture] | |
public class Tests | |
{ |
-- This version returns a constructor for a PlayerModel, needing only a "name" | |
playerNeedingName : Maybe PlayerModel -> List PlayerModel -> (String -> PlayerModel) | |
playerNeedingName selectedPlayer players = | |
selectedPlayer | |
|> Maybe.map withName | |
|> Maybe.withDefault (nextPlayerModel players) |
I hereby claim:
To claim this, I am signing this object: