Open dcarley opened 7 years ago
As you can see I've didn't do the Update case in unit test, I had this issue and that's really good that you leverage this point. I need more your opinion to know what we should do for tests, if we try to mock or directly use their kind of framework. I've didn't use it because first I thought I could do without and have a better usecases cover but it seems quite hard to mock and so on. So what do you think ?
I've noticed in the unit tests that do:
It's not possible to test an
resource.Update()
method which usesresourceData.HasChange()
becauseresourceData
doesn't have any record of the before and after diff.Do you have any thoughts about how it might be possible to implement a more realistic test? I was wondering..
schema.Resource.Diff()
andschema.Resource.Apply()
ourselves?resource.Test
acceptance test framework along with the fake client?