Commit 2753b0a5 authored by HellLab's avatar HellLab
Browse files

model tests

parent c08a79b9
Pipeline #6503 passed with stage
in 6 minutes and 34 seconds
......@@ -52,12 +52,18 @@ class Appointment {
return "$year-$month-$day";
}
bool equals(Appointment app){
return toString() == app.toString();
bool equals(Appointment app) {
return id == app.id &&
year == app.year &&
month == app.month &&
day == app.day &&
name == app.name &&
time == app.time &&
duration == app.duration &&
location == app.location;
}
String toString(){
String toString() {
return "ID: $id Name: $name Date: $date Time: $time Duration: $duration Location: $location Note: $note";
}
}
......@@ -2,7 +2,7 @@
import 'dart:async';
import 'dart:convert';
import 'dart:html';
import 'package:demo/src/view/main_component.dart';
import 'package:http/http.dart';
......
......@@ -18,3 +18,4 @@ dependencies:
build_web_compilers: ^1.0.0
pedantic: ^1.0.0
analyzer: ^0.34.3
test: ^1.5.0
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment