46dd3594c9
Merge pull request #8 from svenvanheugten/mark-trivial-test-cases
...
Mark trivial test cases
2026-01-05 23:49:04 +01:00
f42a8747dd
Mark trivial test cases
2026-01-05 23:48:16 +01:00
9bb16b0935
Merge pull request #7 from svenvanheugten/add-more-tests
...
Add a test that verifies that the remote turns on the lights
2026-01-05 23:40:26 +01:00
d3c0881c39
Add a test that verifies that the remote turns on the lights
2026-01-05 23:39:51 +01:00
bb7e6d18ce
Merge pull request #6 from svenvanheugten/add-remote-control
...
Add remote control
2026-01-05 23:24:47 +01:00
c1d9029a73
Demonstrate and fix some odd behaviour with some bulbs
2026-01-05 23:21:46 +01:00
10d858817d
Turn on lights before changing brightness and color
2026-01-05 23:10:26 +01:00
9bc76cdf8e
Invert helper function
2026-01-05 23:06:12 +01:00
b9a318a5f1
Improve test name
2026-01-05 22:51:30 +01:00
2443468eb4
Fix the bug by keeping state
2026-01-05 22:49:41 +01:00
bb528e9942
Get rid of arbitraries that are only used once
2026-01-05 22:34:56 +01:00
7472825140
Demonstrate a bug
2026-01-05 22:27:02 +01:00
e792a57cb4
Improve error for unknown topics
2026-01-05 22:07:09 +01:00
52e0ec85e9
Introduce the remote into FakeHome
2026-01-05 22:07:09 +01:00
cef2a20f7a
Remove some ambiguity
2026-01-05 21:54:34 +01:00
838bbb79a3
Add naive remote control implementation
2026-01-05 21:53:48 +01:00
d2864fcc22
Give tests better names
2026-01-05 21:37:35 +01:00
14cfaaeed5
Generalize the genInteractionListThatEndsAtTime concept
2026-01-05 21:37:23 +01:00
9e97d9a37b
Merge pull request #5 from svenvanheugten/refactor-tests-to-use-better-arbitraries
...
Refactor tests to use better arbitraries
2026-01-05 20:29:02 +01:00
0e112f313a
Swap test order
2026-01-05 20:27:09 +01:00
f787c2aa4e
Re-write tests to avoid ==>
2026-01-05 20:26:55 +01:00
4c22b27805
Remove a pointless test
2026-01-05 19:20:36 +01:00
89a8c599c7
Strongly type the device FriendlyName
2026-01-05 19:19:04 +01:00
8cc59c4738
Merge pull request #4 from svenvanheugten/fix-docker-build
...
Fix Docker build
2026-01-04 20:24:19 +01:00
2fb5bde636
Merge pull request #3 from svenvanheugten/make-fake-home-independent
...
Make FakeHome independent of NightLightStateMachine
2026-01-04 20:23:55 +01:00
52ec6dc025
Fix Docker build
...
The solution file includes the test project, but the test project isn't
copied into the first stage of the Dockerfile.
2026-01-04 20:23:18 +01:00
15bf8db9f4
Make FakeHome independent of NightLightStateMachine
2026-01-04 20:18:37 +01:00
9531dee52b
Stop requiring the initial time in NightLightStateMachine
...
We're only fooling ourselves if we think that it's ready *right* after
construction anyway. After all, the initial state of the lights won't be
updated when the state machine is constructed.
2026-01-04 20:16:58 +01:00
db4434cd20
Remove Time on FakeHome
...
We'll have a lot more stuff that we need to compute from the actual
interactions, so let's just get the boilerplate ready.
2026-01-04 19:42:43 +01:00
c8e1f0c9fe
Make sure that the first interaction sets the time
...
This is what happens in the `NightLight` program as well.
2026-01-04 19:41:34 +01:00
4e6fc6645c
Merge pull request #2 from svenvanheugten/add-tests
...
Add tests
2026-01-04 12:13:16 +01:00
f6fdbddafd
Merge pull request #1 from svenvanheugten/introduce-state
...
Introduce the ability to remember state
2026-01-04 12:11:42 +01:00
48aaabde3b
Add tests for colors
2026-01-04 12:10:07 +01:00
7125fee28e
Parse color commands in FakeHome
2026-01-04 12:10:07 +01:00
6baf725765
Put Arbitraries on the entire test class
2026-01-04 12:10:07 +01:00
c7c5de9e21
State -> NightLightStateMachine
2026-01-04 12:10:06 +01:00
285874777a
Get rid of NightLightStateMachine in the tests
2026-01-04 12:09:09 +01:00
bd550bfcd9
Encapsulate State to make it impossible to read
...
This was NightLightStateMachine's purpose, but it fits equally well
in the actual production code.
2026-01-04 12:09:07 +01:00
83b716a509
Reorganize types to prepare for unit testing
2026-01-04 12:08:10 +01:00
a741938f89
Stop propagating parse errors throughout the tests
2026-01-04 12:08:10 +01:00
5219abfb4b
Fix incorrect namespaces
2026-01-04 12:08:10 +01:00
109ebde64a
Write the first test
2026-01-04 12:08:10 +01:00
7ea6e49001
Introduce decodeMqttApplicationMessage
2026-01-04 12:08:10 +01:00
fc069edf31
Implement FakeHome
2026-01-04 12:08:10 +01:00
27c6646237
Put a full Message in ReceivedZigbeeEvent
...
We'll need the topic later.
2026-01-04 12:08:10 +01:00
10e26a4866
Turn Message into a record type
2026-01-04 12:08:10 +01:00
ab6e123efc
ZigbeeCommand -> Message
...
There isn't really anything specifically Zigbee about this type.
2026-01-04 12:08:10 +01:00
12d0ecf0e6
Be a bit more diligent with task creation
2026-01-04 12:08:10 +01:00
c377ec25dc
Introduce the Models module in order to make others internal
2026-01-04 12:08:10 +01:00
915d01e086
Introduce mqttMessageToReceivedZigbeeEvent
...
To make it more obvious that both cases in mainAsync
just handle events.
2026-01-04 12:08:10 +01:00