예제 #1
0
        public async Task CreateManufactoryAsyncShouldReturnName()
        {
            var manufactoryRepository = new Repository <Manufactory>(db);
            var manufactoryService    = new ManufactoryService(manufactoryRepository);

            var manufactory = await manufactoryService.CreateManufactoryAsync("Kaih");

            var expected = "Kaih";
            var actual   = manufactory.Name;

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public async Task GetManufactoryByNameAsyncShouldReturnId()
        {
            var manufactoryRepository = new Repository <Manufactory>(db);
            var manufactoryService    = new ManufactoryService(manufactoryRepository);

            var manufactoryCreate = await manufactoryService.CreateManufactoryAsync("Kaih");

            var manufactory = await manufactoryService.GetManufactoryByNameAsync("Kaih");

            var expected = 1;
            var actual   = manufactory.Id;

            Assert.Equal(expected, actual);
        }