Пример #1
0
        public async Task GetEventTypesReturnsValidResponse()
        {
            using (var context = SqlLiteInMemory.GetTestContext())
            {
                context.SeedDbEventTypes();
                var lookupController = new LookupController(context);

                var result = await lookupController.GetEventTypes();

                Assert.That(result, Is.InstanceOf(typeof(OkObjectResult)));
                var ok = (OkObjectResult)result;
                Assert.That(ok.Value, Is.InstanceOf(typeof(List <EventType>)));
                var listResult = (List <EventType>)ok.Value;
                Assert.AreEqual(3, listResult.Count);
            }
        }