{"ScriptPreparationCode":"var DefaultWastageType;\r\n\r\nDefaultWastageType = (function() {\r\n function DefaultWastageType() {}\r\n\r\n DefaultWastageType.get = function() {\r\n return 5;\r\n };\r\n\r\n return DefaultWastageType;\r\n\r\n})();","TestCases":[{"Name":"in","Code":"var x = function(types) {\r\n return types.find(function(type) {\r\n var defaultId;\r\n defaultId = DefaultWastageType.get();\r\n return type.wastageTypeId = defaultId \u0026\u0026 (type.isPrimary = true);\r\n });\r\n};\r\n\r\n\r\nx([\r\n {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 5\r\n }\r\n]);","IsDeferred":false},{"Name":"out","Code":"var x = function(types) {\r\n var defaultId;\r\n defaultId = DefaultWastageType.get();\r\n return types.find(function(type) {\r\n return type.wastageTypeId = defaultId \u0026\u0026 (type.isPrimary = true);\r\n });\r\n}\r\n\r\n\r\nx([\r\n {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 1\r\n }, {\r\n wastageTypeId: 5\r\n }\r\n]);","IsDeferred":false}]}