Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        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));
        }