Exemplo n.º 1
0
        public void VerifyContracts()
        {
            var concordHost = new ConcordHost();

            concordHost.RegisterTestServer <Startup>(ConfigureDependencyInjection, scenarioHandler: _scenarioHandler);
            concordHost.AddContractDefinition(@"../../../../../../src/ConcordNet.UnitTests/TestFiles/website-api.json");
            concordHost.VerifyContractDefinitions();
        }
Exemplo n.º 2
0
 public void GivenValidSetup_WhenCreatingNewHost_ThenHostIsCreated()
 {
     Assert.DoesNotThrow(() =>
     {
         var concordHost = new ConcordHost();
         concordHost.RegisterTestServer <TestStartup>();
         Assert.NotNull(concordHost.TestServer);
     });
 }
Exemplo n.º 3
0
 public void GivenValidFile_WhenAddingAsContractDefinition_ThenFileIsAddedToList()
 {
     Assert.DoesNotThrow(() =>
     {
         var concordHost = new ConcordHost();
         concordHost.AddContractDefinition("./TestFiles/website-api.json");
         Assert.That(concordHost.ContractDefinitions.Count, Is.EqualTo(1));
     });
 }