public void TestService_can_be_tested_with_attribute(TestService sut, string name) { var result = sut.Hello(name); Assert.That(result, Does.EndWith(name)); }
public void WhenQuerying_ThenCanGetTotalCount() { var baseUri = new Uri("http://localhost:20000"); var service = new TestService(); var config = new ServiceConfiguration(service); using (new SafeHostDisposer( new HttpQueryableServiceHost(typeof(TestService), 25, config, new Uri(baseUri, "products")))) { var client = new HttpEntityClient(baseUri); var products = client.Query<Product>(resourceName, new { search = "kzu" }).Skip(5).Take(10); var query = products as IHttpEntityQuery<Product>; var response = query.Execute(); Assert.Equal(2, response.TotalCount); Assert.Equal(0, response.Count()); Assert.True(response.Response.IsSuccessStatusCode); } }
public void AutoFixture_returns_TestContextLoggerAdapter_when_ILogger_is_requested([Frozen] ILogger <TestService> logger, TestService sut) { Assert.That(logger, Is.InstanceOf <TestContextLoggerAdapter <TestService> >()); }