Esempio n. 1
0
        public void NotFoundTest()
        {
            var cases = new FigureUseCases(new TestFigurePort());
            var id    = Guid.NewGuid();

            Assert.Throws <BusinessLogicException>(() => cases.CalculateArea(id));
        }
Esempio n. 2
0
        public void CreateAndCalculateTest()
        {
            var cases = new FigureUseCases(new TestFigurePort());
            var id    = cases.Create(new Circle()
            {
                Radius = 100
            });
            var area = cases.CalculateArea(id);

            Assert.Equal(31415.926535897932, area);
        }