/// <summary> /// Default constructor /// </summary> static ApiBestPracticeTestBase() { string swaggerFile; using (Stream resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Jab.Fixtures.swagger.json")) using (StreamReader stringReader = new StreamReader(resourceStream)) { swaggerFile = stringReader.ReadToEnd(); } Configuration = new JabTestConfiguration(swaggerFile, null); }
public void Ctor_NullBaseUrl() { JabTestConfiguration jabTestConfiguration; jabTestConfiguration = new JabTestConfiguration(SwaggerJson, null); Assert.That( jabTestConfiguration, Has.Property("SwaggerService").Not.Null .And.Property("SwaggerService").Property("Paths").Empty); Assert.That( jabTestConfiguration, Has.Property("BaseUrl").Null); }
public void Ctor_SuppliedBaseUrl() { JabTestConfiguration jabTestConfiguration; Uri baseUrl; baseUrl = new Uri("http://myapi.com"); jabTestConfiguration = new JabTestConfiguration(SwaggerJson, baseUrl); Assert.That( jabTestConfiguration, Has.Property("SwaggerService").Not.Null .And.Property("SwaggerService").Property("Paths").Empty); Assert.That( jabTestConfiguration, Has.Property("BaseUrl").EqualTo(baseUrl)); }