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

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

Build:
DEFAULT BRANCH: master
Ran 18 Mar 2019 08:32AM UTC
Jobs 1
Files 101
Run time 5s
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

pending completion
358

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

Jobs
ID Job ID Ran Files Coverage
1 358.1 18 Mar 2019 08:32AM UTC 0
83.08
Travis Job 358.1
Source Files on build 358
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #358
  • d910451f on github
  • Prev Build on master (#352)
  • Next Build on master (#359)
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