diff options
Diffstat (limited to 'recipeBuddy/src/app/DataModels')
-rw-r--r-- | recipeBuddy/src/app/DataModels/ingredients.spec.ts | 7 | ||||
-rw-r--r-- | recipeBuddy/src/app/DataModels/ingredients.ts | 29 | ||||
-rw-r--r-- | recipeBuddy/src/app/DataModels/recipe.ts | 4 | ||||
-rw-r--r-- | recipeBuddy/src/app/DataModels/steps.spec.ts | 7 | ||||
-rw-r--r-- | recipeBuddy/src/app/DataModels/steps.ts | 18 |
5 files changed, 63 insertions, 2 deletions
diff --git a/recipeBuddy/src/app/DataModels/ingredients.spec.ts b/recipeBuddy/src/app/DataModels/ingredients.spec.ts new file mode 100644 index 0000000..17b5858 --- /dev/null +++ b/recipeBuddy/src/app/DataModels/ingredients.spec.ts @@ -0,0 +1,7 @@ +import { Ingredients } from './ingredients'; + +describe('Ingredients', () => { + it('should create an instance', () => { + expect(new Ingredients()).toBeTruthy(); + }); +}); diff --git a/recipeBuddy/src/app/DataModels/ingredients.ts b/recipeBuddy/src/app/DataModels/ingredients.ts new file mode 100644 index 0000000..6f96e69 --- /dev/null +++ b/recipeBuddy/src/app/DataModels/ingredients.ts @@ -0,0 +1,29 @@ +export class Ingredients { + private names: string[]; + private amounts: number[]; + private units: string[]; + private types: string[]; + + public constructor(names: string[], amounts: number[], units: string[], types: string[]) { + this.names = names; + this.amounts = amounts; + this.units = units; + this.types = types; + } + + public getNames(): string[] { + return this.names; + } + + public getAmounts(): number[] { + return this.amounts; + } + + public getUnits(): string[] { + return this.units; + } + + public getTypes(): string[] { + return this.types; + } +} diff --git a/recipeBuddy/src/app/DataModels/recipe.ts b/recipeBuddy/src/app/DataModels/recipe.ts index cd121dd..3194adc 100644 --- a/recipeBuddy/src/app/DataModels/recipe.ts +++ b/recipeBuddy/src/app/DataModels/recipe.ts @@ -53,10 +53,10 @@ export class Recipe { public getCookTime(): number { return this.cookTime; } + public getTimesCooked(): number { return timesCooked; } - public getRating(): number { return this.rating; } @@ -64,7 +64,7 @@ export class Recipe { public getTags(): string[] { return this.tags; } - + public getPhotos(): string[] { return this.photos; } diff --git a/recipeBuddy/src/app/DataModels/steps.spec.ts b/recipeBuddy/src/app/DataModels/steps.spec.ts new file mode 100644 index 0000000..e315565 --- /dev/null +++ b/recipeBuddy/src/app/DataModels/steps.spec.ts @@ -0,0 +1,7 @@ +import { Steps } from './steps'; + +describe('Steps', () => { + it('should create an instance', () => { + expect(new Steps()).toBeTruthy(); + }); +}); diff --git a/recipeBuddy/src/app/DataModels/steps.ts b/recipeBuddy/src/app/DataModels/steps.ts new file mode 100644 index 0000000..9061dc2 --- /dev/null +++ b/recipeBuddy/src/app/DataModels/steps.ts @@ -0,0 +1,18 @@ +export class Steps { + private instructions: string[]; + private timers: number[]; + + public contructor(instructions: string[], timers: number[]) { + this.instructions = instructions; + this.timers = timers; + } + + public getInstructions(): string[] { + return this.instructions; + } + + public getTimers(): number[] { + return this.timers; + } + +} |