예제 #1
0
        public async Task GetAll()
        {
            var firstId = await _service.Put(
                new StateMachineInputDto()
            {
                Name = "first name", Body = "first body"
            });

            var secondId = await _service.Put(
                new StateMachineInputDto()
            {
                Name = "second name", Body = "second body"
            });

            var all = await _service.GetAll(null);

            Assert.Equal(2, all.Count);
            Assert.True(all.Any(x => x.Id == firstId && x.Name == "first name" && x.Body == "first body"));
            Assert.True(all.Any(x => x.Id == secondId && x.Name == "second name" && x.Body == "second body"));
        }
예제 #2
0
        public async Task <ApiResponse <IList <StateMachineOutputDto> > > Get()
        {
            var dtos = await _stateMachineService.GetAll(null);

            return(ApiResponse.OK(dtos));
        }