public void DoppioClass_Countructor_ShouldInitializeObjectCorrectly() { // Arrange var coffeeSize = CoffeSizeType.Medium; // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj, Is.InstanceOf <Doppio>()); }
public void DoppioClass_FullDescriptionProperty_ShouldExists() { // Arrange var coffeeSize = CoffeSizeType.Medium; // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj, Has.Property("FullDescription")); }
public void DoppioClass_ShouldInheritCoffeeAbstractClass() { // Arrange var coffeeSize = CoffeSizeType.Medium; // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj, Is.InstanceOf <Coffee>()); }
public void DoppioClass_ShouldImplementICoffeeInterface() { // Arrange var coffeeSize = CoffeSizeType.Medium; // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj, Is.InstanceOf <ICoffee>()); }
public void DoppioClass_Countructor_ShouldSetSizeCorrectly() { // Arrange var coffeeSize = CoffeSizeType.Medium; var expectedSize = coffeeSize.ToString(); // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj.FullDescription, Does.Contain(expectedSize)); }
public void DoppioClass_IdProperty_ShouldReturnCorrectId() { // Arrange var coffeeSize = CoffeSizeType.Medium; var expectedId = "DOP"; // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj, Has.Property("Id").EqualTo(expectedId)); }
public void DoppioClass_CostMethod_ShouldReturnCorrectPriceBasedOnCoffeSize(CoffeSizeType coffeeSize) { // Arrange var basePrice = 2.50m; var expectedCost = basePrice + (((int)coffeeSize / 100) * basePrice); // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj.Cost(), Is.EqualTo(expectedCost)); }
public void DoppioClass_FullDescriptionProperty_ShouldReturnCorrectFullDescription() { // Arrange var coffeeSize = CoffeSizeType.Medium; var expectedDescription = "Doppio"; var expectedSize = coffeeSize.ToString(); var expectedFullDescription = expectedSize + " " + expectedDescription; // Act var obj = new Doppio(coffeeSize); // Assert Assert.That(obj, Has.Property("FullDescription").EqualTo(expectedFullDescription)); }