public async Task can_create_capability_with_an_acceptable_name(string input) { var sut = new CapabilityApplicationServiceBuilder() .WithCapabilityRepository(new StubCapabilityRepository()) .Build(); await sut.CreateCapability(input, string.Empty); }
public async Task can_create_capability_with_an_acceptable_description(string input) { var sut = new CapabilityApplicationServiceBuilder() .WithCapabilityRepository(new StubCapabilityRepository()) .Build(); await sut.CreateCapability("AName", input); }
public async Task cannot_create_capabilities_with_invalid_names(string input) { var sut = new CapabilityApplicationServiceBuilder() .WithCapabilityRepository(new StubCapabilityRepository()) .Build(); await Assert.ThrowsAsync <CapabilityValidationException>(() => sut.CreateCapability(input, string.Empty)); }
public async Task throws_exception_with_underscore_in_name() { var sut = new CapabilityApplicationServiceBuilder() .WithCapabilityRepository(new StubCapabilityRepository()) .WithCapabilityFactory(new CapabilityFactory()) .Build(); var dummyName = "A_Name"; await Assert.ThrowsAsync <CapabilityValidationException>(() => sut.CreateCapability(dummyName, string.Empty)); }