The week started by completing the conversion of parameters files into events by using the enum class.
Next, I created multiple tests for the my transaction function, which creates a new purchase invoice based on different services.
Unfortunately, I had an error with the previously created tested for my transaction function, as the SupplierId could not get updated, it was null, but I couldn’t find the way to solve it, only to realize later on with the help of my supervisor, that I did not initialize the SupplierId in the tests, because I thought by just initializing and getting access to the whole entity, it will automatically assign the SupplierId, which was obviously wrong and made the tests created fail.
I then started analyzing the aggregates in the project, and found myself not understanding the concept behind the many-to-many relationship between some entities in the project. With further discussion, the relationship was converted from many-to-many to one-to-many relationship, and due to this many changes were needed to made.
Among the changes done to the files, were to change the complete function in the transaction for the purpose of auditing. As well as, EventName, Time and UserId has been added to the service functions, for auditing purposes as well, such that the when changes have been made, the person who made the change, along with the time and the change made can be tracked. Thus, by making these changes new parameters have been added to the methods.
Previously, the services and repositories interface used to implement the IDisposable interface, but now a new interface has been created that implements the complete, commit and rollback functions, not forgetting that this new interface implements the IDisposable interface as well.
Lastly, an important thing I learnt from Git, is that Pull merges two coding files together, in other words, it adds the changes that have been in both files and merges them into one. Push, on the other hand, add the branch into the project but does not merge it.
That’s all, see you all next week 🙂
