{"id":305,"date":"2021-04-19T11:38:44","date_gmt":"2021-04-19T03:38:44","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=305"},"modified":"2021-04-19T11:38:45","modified_gmt":"2021-04-19T03:38:45","slug":"working-more-on-the-project-structure","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/","title":{"rendered":"Working more on the project structure"},"content":{"rendered":"\n<p>Continuing fixing errors from the pull and merging of codes, a lot of changes have been made to ensure that the codes compile and align with the new project structure. <\/p>\n\n\n\n<p>The tests that have been written previously for Purchase Order and Goods Received were in need of changing and fixing, as the code structure have changed, the tests also got affected, as a result, the test bases were in need to be checked and fixed, because when debugging the tests to see where the error lies, the debugger does not run through the test, meaning it does not go into the test method environment indicating that the error lies in the test base. <\/p>\n\n\n\n<p>Another thing is the save changes during initialization. Save changes is set to true without using the newly added save changes which is equipped with audit, because we are just initialization and setting the environment, thus, we do not need to audit or check and keep track to see who has made changes to the codes. <br>When writing tests, the Linq property Single() cannot be used for entities that are equipped with more than one element, as in this case we are trying to assume that entity has only one value which is not true. Thus First() is used when we want to retrieve one element only.<\/p>\n\n\n\n<p>After the fixing and refactoring of codes, the views of the purchase invoice module were not being displayed, due to 2 main reasons which were that the Region Manager for purchase invoice was not added, as well as I mistakenly created a new view and removed the <code>prism:ViewModelLocator.AutoWireViewModel=\"True\"<\/code> which resulted in the pages not being attached to each other and hence cannot be redirected once requested. <\/p>\n\n\n\n<p>In the view models, often the properties are assigned with two access modifiers. Properties with private access modifiers when used do not make any changes to the User interface, on the other hand, properties with public as their access modifiers when changed or used will make changes on the user interface. <\/p>\n\n\n\n<p>These are the major things that have been learnt the past week. See you all next week \ud83d\ude42<\/p>\n\n\n\n<p> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuing fixing errors from the pull and merging of codes, a lot of changes have been made to ensure that the codes compile and align with the new project structure. The tests that have been written previously for Purchase Order and Goods Received were in need of changing and fixing, as the code structure have &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Working more on the project structure&#8221;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[10,3],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Working more on the project structure | Tong Hin&#039;s Blog<\/title>\n<meta name=\"description\" content=\"unit test writing and the way to understand the debugging when it does not run through the test. Reasons for views not being displayed.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working more on the project structure | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"unit test writing and the way to understand the debugging when it does not run through the test. Reasons for views not being displayed.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-19T03:38:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-19T03:38:45+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/\",\"name\":\"Working more on the project structure | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2021-04-19T03:38:44+00:00\",\"dateModified\":\"2021-04-19T03:38:45+00:00\",\"description\":\"unit test writing and the way to understand the debugging when it does not run through the test. Reasons for views not being displayed.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/\",\"name\":\"Working more on the project structure\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\"},\"headline\":\"Working more on the project structure\",\"datePublished\":\"2021-04-19T03:38:44+00:00\",\"dateModified\":\"2021-04-19T03:38:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"keywords\":\"mvvm,tdd\",\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/04\/19\/working-more-on-the-project-structure\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\",\"name\":\"Faizah Chaibou\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c69df35ce6d69b7d1b66311b4144ea8?s=96&d=mm&r=g\",\"caption\":\"Faizah Chaibou\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/305"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=305"}],"version-history":[{"count":3,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/305\/revisions"}],"predecessor-version":[{"id":309,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/305\/revisions\/309"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}