Exemplo n.º 1
0
        public async Task should_return_record_by_id(string guid)
        {
            DbContextOptions <ERPContext> options = new DbContextOptionsBuilder <ERPContext>()
                                                    .UseInMemoryDatabase(databaseName: "should_return_record_by_id")
                                                    .Options;

            await using TestERPContext context = new TestERPContext(options);
            context.Database.EnsureCreated();

            ItemRespository sut    = new ItemRespository(context);
            Item            result = await sut.GetAsync(new Guid(guid));

            result.Id.ShouldBe(new Guid(guid));
        }
Exemplo n.º 2
0
        public async Task should_get_data()
        {
            System.Collections.Generic.IEnumerable <Item> result = await _itemRespository.GetAsync();

            result.ShouldNotBeNull();
        }