Exemplo n.º 1
0
        public void Print_WhenInvoked_ShouldReturnShampooDetailsInValidStringFormat()
        {
            // Arrange
            var shampoo = new Shampoo("example", "Pesho", 10M, GenderType.Unisex, 100, UsageType.EveryDay);

            var expectedResult = new StringBuilder();
            expectedResult.AppendLine("- Pesho - example:");
            expectedResult.AppendLine("  * Price: $1000");
            expectedResult.AppendLine("  * For gender: Unisex");
            expectedResult.AppendLine("  * Quantity: 100 ml");
            expectedResult.Append("  * Usage: EveryDay");

            // Act
            var executionResult = shampoo.Print();

            // Assert
            Assert.AreEqual(expectedResult.ToString(), executionResult);
        }
Exemplo n.º 2
0
        public IShampoo CreateShampoo(string name, string brand, decimal price, GenderType gender, uint milliliters, UsageType usage)
        {
            var shampoo = new Shampoo(name, brand, price, gender, milliliters, usage);

            return shampoo;
        }