public void AddCatapultEngine_DuplicateItem() { var catapultEngineService = new CatapultEngineService(_catapultEngineRepository.Object); var exception = Record.ExceptionAsync(() => catapultEngineService.CreateCatapultEngine("test")); Assert.IsType <DuplicateCatapultEngineException>(exception?.Result); }
public async void AddCatapultEngine_ValidItem() { var catapultEngineService = new CatapultEngineService(_catapultEngineRepository.Object); var newCatapultEngine = await catapultEngineService.CreateCatapultEngine("enginetest"); Assert.NotNull(newCatapultEngine); Assert.True(_data.Count > 1); }