https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
atrium
  • a

    alan.kleiman

    12/04/2017, 3:06 PM
    Cool, thanks.
    r
    • 2
    • 2
  • m

    mkobit

    12/05/2017, 4:49 PM
    it's your library so it's ultimately your choice. it is a personal preference, but one of those that is a big pet peeve of mine
    IAssertionPlant
    versus
    AssertionPlant
    and
    ICheckingAssertionPlant
    versus
    CheckingAssertionPlant
    IAssertionPlant
    is what i find myself starting to use for extension functions for assertions also another thing that i really like about the library is no
    infix
    functions
  • d

    dio

    01/15/2018, 5:16 PM
    I think I get it
    r
    • 2
    • 3
  • d

    dio

    01/15/2018, 10:54 PM
    hint taken, I might need suggestions, per earlier I have Either<String, Data> where
    Data
    is a kotlin
    data class
    so my assertions were vs specific fields in my
    Data
    class
    r
    • 2
    • 3
  • c

    christophsturm

    06/07/2018, 11:49 AM
    I’m trying to get startet with atrium, but when i add
    assert(4 + 6).isLessThan(5)
    to my code it does not offer to import anything and uses the assert(boolean) from the kotlin standard lib
    r
    • 2
    • 6
  • c

    christophsturm

    06/07/2018, 4:17 PM
    also important: the test code should be easy to read, and it should be easy to find out what matchers are available and whats the best way do write an assertion
    r
    • 2
    • 1
  • c

    christophsturm

    06/08/2018, 1:26 PM
    hmm do you publish source jars? idea usually downloads them but did not
    r
    • 2
    • 10
  • g

    ghedeon

    06/10/2018, 10:42 PM
    what is your way of having a clean assertion of RxJava values? Do you use built-in assertions of TestObserver? Or something with atrium, like:
    fun posts(): Single<Foo>...
    ...
    test:
    
    val answer = foo().test().values().first()
    
    //assert answer with atrium
    this
    .test().values().first()
    looks a bit verbose, do you wrap it into an extension function? Just curious what's the best practice here
    r
    • 2
    • 4
  • r

    robstoll

    06/16/2018, 8:21 PM
    I am happy to announce that 0.7.0 is out. Enjoy 😁 Please take note of the migration guide at the end of the release notes: https://github.com/robstoll/atrium/releases/tag/v0.7.0
    🎉 1
    d
    • 2
    • 18
  • b

    bitkid

    06/18/2018, 3:21 PM
    we don't use a lot of atrium yet .. just in the process of migrating to it. will check out 0.7.0! thx 🙂
    r
    • 2
    • 1
  • c

    christophsturm

    07/11/2018, 11:20 AM
    hmm i thought about that, but it definately does not suggest values after typing ignoringCase
    r
    • 2
    • 49
  • d

    dave08

    07/23/2018, 7:25 AM
    I have a funny problem... I have the proper context in
    isNotNull
    (the IDE shows it), but
    toBe
    is resolved to
    @kotlin.Deprecated public fun <T : java.math.BigDecimal> ch.tutteli.atrium.creating.Assert<T>
    , so I get an error that my type is not derived from BigDecimal...?
    r
    • 2
    • 1
  • c

    christophsturm

    07/23/2018, 10:30 AM
    right now idea suggests
    ch.tutteli.atrium.verbs.assert.assert
    and
    ch.tutteli.atrium.verbs.assert
    as autoimport for assert, the first of which is deprecated. is it possible to get a jar file that does not include the deprecated methods?
    r
    • 2
    • 5
  • d

    dave08

    07/23/2018, 1:05 PM
    No, it's not a var...
    r
    • 2
    • 13
  • h

    Hadi Tok

    10/05/2018, 12:04 PM
    hey Robert and all 👋. I had a really weird JVM fatal error when I run tests with gradle. I thought might be related with atrium. I updated JDK version and it is now gone. I am still not sure what is the root cause of the problem though 🙂
    r
    • 2
    • 5
  • k

    keturn

    10/12/2018, 3:28 PM
    though I was wondering when working with this, does the IDE maintain code completion support for
    ::name
    here?
    r
    • 2
    • 1
  • k

    keturn

    10/15/2018, 3:29 AM
    Got any handy assertion functions for comparing JSON documents?
    r
    • 2
    • 10
  • b

    Ben

    11/12/2018, 4:48 PM
    Is there a way to use contains with a list of nullables?
    r
    • 2
    • 1
  • c

    charleskorn

    12/08/2018, 9:43 PM
    Is there some way to assert that a function does not throw?
    r
    • 2
    • 16
  • h

    Hadi Tok

    12/26/2018, 3:49 PM
    Hi, I had a problem with atrium on gradle 5.0 it is related with dependency scopes probably because I had a similar problem with mockk also. Is it a known problem?
    r
    • 2
    • 6
  • r

    robstoll

    01/12/2019, 6:45 PM
    I would like to get some feedback concerning variable length argument lists. I am using the following pattern throughout the API for variable length argument lists:
    first: T, vararg others: T
    . For instance:
    fun <E : Any, T : Iterable<E>> Assert<T>.contains(expected: E, vararg otherExpected: E)
    The intention behind it: this way one has to pass at least one argument (compiler is not happy otherwise). I would like to know what you experienced so far: 1️⃣ it was helpful 2️⃣ it is confusing/makes things more complicated
    1️⃣ 2
    c
    • 2
    • 1
  • d

    Darren Bell

    09/08/2019, 3:12 PM
    Hi. I'm trying to use the library in a Multiplatform project . Currently I'm getting the following error in my js side:
    Cannot access class 'ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.Builder'. Check your module classpath for missing or conflicting dependencies
    I'm trying to use the 0.9.0-alpha version, my build.gradle.kts for test is quite simple:
    js().compilations["test"].defaultSourceSet {
                dependencies {
                    implementation( kotlin("test-js"))
    
                    implementation("ch.tutteli.atrium:atrium-fluent-en_GB-js:${LibraryVersions.atrium_version}")
    
                }
            }
    Do you have any idea what this might be? Thanks
    r
    • 2
    • 22
  • s

    sanatik

    10/06/2019, 8:08 PM
    Hey @robstoll, Have you ever considered to publish
    atrium
    to Maven Central repo? Any reasons not to?
    r
    • 2
    • 1
  • s

    Shubham Kumar

    10/26/2019, 11:56 AM
    Yes, I raised PR too
    r
    • 2
    • 1
  • l

    Luke

    12/08/2019, 1:44 PM
    Think I've messed up my rebase/merge somehow, looks like it's doubled my commits? https://github.com/lukebiddell/atrium/commits/contributing-faq
    r
    • 2
    • 2
  • l

    Luke

    12/09/2019, 3:20 PM
    ChronoLocalDate doesn't have an isAfterOrEquals fun Should I add a new function to ChronoLocalDate for it, or simply use
    it.isAfter(expected) || it.isEqual(expected)
    ?
    r
    • 2
    • 3
  • i

    Igor Akkerman

    12/31/2019, 12:21 AM
    Hi, I'm new to Atrium (and Kotlin) so bear with me. I have a collection of objects and I want to make assertions on its content using some of the objects' properties. What I currently have is not readable. Is there a cleaner way?
    data class Member(val name: String, val interest: String, val favoriteNumber: Int)
    val members = listOf(Member("Me", "Kotlin", Random.nextInt()), Member("MyDog", "food", Random.nextInt()))
    expect(members)
            .containsExactly(
                    { feature { f(it::name) }.toBe("Me") ; feature { f(it::interest) }.toBe("Kotlin")},
                    { feature { f(it::name) }.toBe("MyDog") ; feature { f(it::interest) }.toBe("food")}
            )
    r
    • 2
    • 26
  • i

    Igor Akkerman

    01/06/2020, 12:18 PM
    One question regarding collections,: In my project, the lists are quite large, is there a way to specify (for in order comparisons) to only show the wrong values so that you don't have to search the front x's through the whole list?
    r
    • 2
    • 18
  • b

    be sem

    01/17/2020, 4:28 PM
    Hi @robstoll I was assigned this issue and just wanted to clarify what it might look like. https://github.com/robstoll/atrium/issues/81
    r
    • 2
    • 1
  • s

    Sebastien Lalumiere

    02/05/2020, 10:34 PM
    Hi @robstoll, I'm working on issue 216. You mention that we need to implement _resolve using ExpectImpl.feature.f1. Do you have an example that could help me with this implementation? The closest example I found was _parent, and it uses ExpectImpl.feature.extractor. Thanks!
    r
    • 2
    • 2
Powered by Linen
Title
s

Sebastien Lalumiere

02/05/2020, 10:34 PM
Hi @robstoll, I'm working on issue 216. You mention that we need to implement _resolve using ExpectImpl.feature.f1. Do you have an example that could help me with this implementation? The closest example I found was _parent, and it uses ExpectImpl.feature.extractor. Thanks!
r

robstoll

02/05/2020, 10:37 PM
it's a simplified ExpectImpl.feature.extractor, you only need to pass the
Expect
, a function reference and the argument and get immediately an ExtractedFeaturePostStep
search for
ExpectImpl.feature.f1
in the code base, you should find something
View count: 4