Ejemplo n.º 1
0
        public async Task Get_EmptyGuid()
        {
            var ctl    = new StatisticsController(_statisticsMock.Object);
            var result = await ctl.Get(Guid.Empty);

            Assert.IsInstanceOf(typeof(BadRequestObjectResult), result);
        }
Ejemplo n.º 2
0
        public async Task TestCase_Read()
        {
            var context = fixture.GetCurrentDataContext();

            this.fixture.InitTestData(context);

            var control = new StatisticsController(context);
            var getrst  = control.Get();

            Assert.NotNull(getrst);
            var getokrst   = Assert.IsType <ObjectResult>(getrst);
            var statisinfo = Assert.IsType <StatisticsInfo>(getokrst.Value);

            await context.DisposeAsync();
        }