コード例 #1
0
        public void Computes_Tea_Price()
        {
            IBeverage tea = new Tea();

            tea.Price().Should().BeApproximately(1.5, 0.001);
        }
コード例 #2
0
        public void Computes_Tea_With_Milk_Price()
        {
            IBeverage teaWithMilk = new Tea(new MilkSupplement());

            teaWithMilk.Price().Should().BeApproximately(1.6, 0.001);
        }
コード例 #3
0
        public void ComputesTeaPrice()
        {
            var tea = new Tea(_supplement);

            Assert.Equal(1.50, tea.Price(), 3);
        }