-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Added Coffee Drinks to Synthetic (#7)
- Loading branch information
1 parent
ccd3c19
commit 7067d9b
Showing
12 changed files
with
257 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Rocket.Surgery.Airframe.Synthetic | ||
{ | ||
/// <summary> | ||
/// Represents an <see cref="IClient"/> that returns <see cref="DrinkDto"/>. | ||
/// </summary> | ||
public class DrinkClientMock : ClientMock<DrinkDto> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DrinkClientMock"/> class. | ||
/// </summary> | ||
public DrinkClientMock() | ||
{ | ||
Items = new List<DrinkDto> | ||
{ | ||
new DrinkDto | ||
{ | ||
Title = "Americano", | ||
Type = DrinkType.Americano, | ||
Description = "Dark. Strong" | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Blonde Americano", | ||
Type = DrinkType.Americano, | ||
Description = "Dark. Strong" | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Blonde Roast", | ||
Type = DrinkType.Brewed | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Caffe Misto", | ||
Type = DrinkType.Brewed | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Dark Roast", | ||
Type = DrinkType.Brewed | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Medium Roast", | ||
Type = DrinkType.Brewed | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Espresso", | ||
Type = DrinkType.Espresso, | ||
Description = "Hot. Bold." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Cappuccino", | ||
Type = DrinkType.Cappuccino, | ||
Description = "Foamy. Light." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Blonde Cappuccino", | ||
Type = DrinkType.Cappuccino, | ||
Description = "Foamy. Light." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Flat White", | ||
Type = DrinkType.FlatWhite, | ||
Description = "Heavy. Full." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Blonde Flat White", | ||
Type = DrinkType.FlatWhite, | ||
Description = "Heavy. Full." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Caffe Latte", | ||
Type = DrinkType.Latte, | ||
Description = "Smooth. Bold." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Vanilla Latte", | ||
Type = DrinkType.Latte, | ||
Description = "Smooth. Bold." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Burnt Honey Latte", | ||
Type = DrinkType.Latte, | ||
Description = "Smooth. Bold." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Hazelnut Latte", | ||
Type = DrinkType.Latte, | ||
Description = "Smooth. Bold." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Macchiato", | ||
Type = DrinkType.Macchiato, | ||
Description = "Hot. Bold." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Carmel Macchiato", | ||
Type = DrinkType.Macchiato, | ||
Description = "Rich. Sweet." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Latte Macchiato", | ||
Type = DrinkType.Macchiato, | ||
Description = "Hot. Bold." | ||
}, | ||
new DrinkDto | ||
{ | ||
Title = "Hazelnut Macchiato", | ||
Type = DrinkType.Macchiato, | ||
Description = "Hot. Bold." | ||
} | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Data; | ||
using JetBrains.Annotations; | ||
|
||
namespace Rocket.Surgery.Airframe.Synthetic | ||
{ | ||
/// <summary> | ||
/// Represents a coffee data service. | ||
/// </summary> | ||
public class DrinkDataService : DataServiceBase<DrinkDto>, IDrinkService | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DrinkDataService"/> class. | ||
/// </summary> | ||
/// <param name="client">The client.</param> | ||
public DrinkDataService(IClient client) | ||
: base(client) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Data; | ||
|
||
namespace Rocket.Surgery.Airframe.Synthetic | ||
{ | ||
/// <summary> | ||
/// A coffee drink data transfer object. | ||
/// </summary> | ||
public class DrinkDto : Dto | ||
{ | ||
/// <summary> | ||
/// Gets or sets the title. | ||
/// </summary> | ||
public string Title { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the description. | ||
/// </summary> | ||
public string Description { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the image. | ||
/// </summary> | ||
public string Image { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the price. | ||
/// </summary> | ||
public double Price { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the type. | ||
/// </summary> | ||
public DrinkType Type { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
namespace Rocket.Surgery.Airframe.Synthetic | ||
{ | ||
/// <summary> | ||
/// Enumeration representing espresso drink types. | ||
/// </summary> | ||
public enum DrinkType | ||
{ | ||
/// <summary> | ||
/// Caffe Americano | ||
/// </summary> | ||
Americano, | ||
|
||
/// <summary> | ||
/// Drip Coffee | ||
/// </summary> | ||
Brewed, | ||
|
||
/// <summary> | ||
/// Cappuccino | ||
/// </summary> | ||
Cappuccino, | ||
|
||
/// <summary> | ||
/// Espresso Shots | ||
/// </summary> | ||
Espresso, | ||
|
||
/// <summary> | ||
/// Flat White | ||
/// </summary> | ||
FlatWhite, | ||
|
||
/// <summary> | ||
/// Caffe Latte | ||
/// </summary> | ||
Latte, | ||
|
||
/// <summary> | ||
/// Macchiato | ||
/// </summary> | ||
Macchiato | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Data; | ||
|
||
namespace Rocket.Surgery.Airframe.Synthetic | ||
{ | ||
/// <summary> | ||
/// Interface representing a coffee drink data service. | ||
/// </summary> | ||
public interface IDrinkService : IDataService<DrinkDto> | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=drinks/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |