tdd


How to TDD (Test-Driven-Development) a model that is related to data persistence?


Assume that I have a boolean that indicates whether the app is launched for the very first time or not (so I can show some guides for the first time)
I encapsulated that boolean into a model class (may be called AppContext)
class AppContext {
var isFirstLaunch: Bool
var otherAppScopeVar: Int
// ...
}
Can I test this kind of things?
you shouldn't!
you should only test your application behavior in those two scenarios.
you need to execute your application after injecting that data with its two different states in order to test both scenarios.

Related Links

How do you do TDD in a non-trivial application?
TDD Spider Solitaire
How to deal with those TDD breaking people? [closed]
How to create a mock object based on an interface and set a read-only property?
Exercises to enforce good practices such as TDD and Mocking
What are some reasons why a sole developer should use TDD?
Database integration tests
Pseudocode Programming Process vs. Test Driven Development
Can TDD Work in a Architect/Implementer Environment? [closed]
Adversarial/Naive Pairing with TDD: How effective is it?
Single most important thing to impart when teaching TDD [closed]
What happened to NUnit?
Developers are dissatisfied with TDD. Is TDD really the problem, or is it a lack of skill of novice practicitioners?
Application Testing
How to shift your paradigm to test-driven development
How do I tell MSTEST to run all test projects in a Solution?

Categories

HOME
hive
minimum-spanning-tree
plot
objectgears
routes
cmd
infragistics
jxls
ckeditor
enterprise-library-5
flyway4
add
applepay
primary-key
google-apps-marketplace
zebra-printers
decimal
serverless-framework
graphlab
contextmenu
visual-composer
abi
microsoft-r
wijmo
url-scheme
internet-explorer-9
nhapi
greendao
webkitspeechrecognition
microsoft-chart-controls
twilio-api
usbserial
webtest
hybridauth
accelerate-framework
android-ble
devextreme
vxworks
espeak
c11
ssjs
hue
ansible-playbook
webdriver-manager
sas-visual-analytics
quadratic-programming
isbn
angular2-meteor
pnotify
clean-architecture
hls.js
pebble-watch
idisposable
nstextview
forever
pg-dump
mako
mcafee
xcb
setuptools
ableton-live
database-optimization
ready-api
ios4
freelancer.com-api
uid
tcpserver
execute
jmeter-maven-plugin
purge
sankey-diagram
createprocessasuser
web-controls
clicktag
jsonpickle
winddk
file-copying
javafx-webengine
java-metro-framework
xojo
google-reader
aapt
reactfx
dealloc
rtmfp
prettify
flexmojos
ms-project-server-2010
tidy
inbox
spring-io
listings
opcache
gwt-rpc
clipper
factory-method
cisco-jtapi
infobox
tomcat-valve
xfbml
nsviewanimation
asp.net-profiles
perfect-hash
compiler-specific
yagni

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App