• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CS2113-AY1819S2-T09-1 / main / 358 / 1
92%
master: 92%

Build:
DEFAULT BRANCH: master
Ran 18 Mar 2019 08:32AM UTC
Files 101
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Mar 2019 08:27AM UTC coverage: 83.083% (-0.02%) from 83.107%
358.1

push

travis-ci

lycjackie
Model: update `Module#isSameModule(...)` (#85)

When comparing if two modules are same using `Module#isSameModule(...)`,
the equality of `Name`, `Code` and `Credits` fields are compared.

However, this comparison may be too strict, and may result in duplicate
modules being created.

e.g. `Module#isSameModule(...)` will return false for the below modules:

  Code: AA1234
  Name: Intro to ABC
  Credits: 4

  Code: AA1234
  Name: Intro to ABC
  Credits: 12

However, they are logically referring to the same module.

We should instead make `Code` the identity field, and make `Name`,
`Credits` and `Tag` data fields of `Module` objects.

Firstly, `Credits` or `Tag` should not be considered as identity fields
because their values are not unique enough.

Secondly, `Name` should not be considered as an identity field because
some modules have identical names, but refer to different modules.

For instance, the below two modules are two separate entities:

  Code: GEK1531
  Name: Cyber Security
  Credits: 4

  Code: GET1004
  Name: Cyber Security
  Credits: 4

Let's update the `Module#isSameModule(...)` equality comparison to
reflect the changes in identity fields for `Module` objects, and fix the
affected unit tests as well.

1768 of 2128 relevant lines covered (83.08%)

0.83 hits per line

Source Files on job 358.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 262
  • Travis Job 358.1
  • d910451f on github
  • Prev Job for on master (#352.1)
  • Next Job for on master (#359.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc