예제 #1
0
        public void NoCustomerWithSutBuilder()
        {
            var sutBuilder = SuperMegaUseCaseBuilder
                             .Create()
                             .RetrievesCustomers(new string[0]);

            var superMega = sutBuilder.Build();

            superMega.DoSomething();

            sutBuilder.Display.Verify(d => d.Show(It.IsAny <string>()), Times.Never);
        }
예제 #2
0
        public void ManyCustomersWithSutBuilder()
        {
            var sutBuilder = SuperMegaUseCaseBuilder
                             .Create()
                             .RetrievesCustomers(new[] { "massimo", "matteo" });

            var superMega = sutBuilder.Build();

            superMega.DoSomething();

            sutBuilder.Display.Verify(d => d.Show("massimo"), Times.Once);
            sutBuilder.Display.Verify(d => d.Show("matteo"), Times.Once);
        }