Found 30 packages
A fluent wrapper around System.IO
This library contains a runtime environment for executing HL7 FhirPath queries and invariants. It is used by the Firely .NET SDK to run validation for the HL7 FHIR object model.
FluentPath is a fluent wrapper API around System.IO
This library contains a runtime environment for executing HL7 FhirPath queries and invariants. It is used by the HL7 .NET FHIR API to run validation for the HL7 FHIR object model. Special made for DSTU2
Package Description
FluentPathZip is a companion library to FluentPath that deals with fluently zipping and unzipping files.
Compression extensions for FluentPath
*TestBase* gets you off to a flying start when unit testing projects with dependencies. TestBase-Mvc adds a rich extensible set of fluent assertions for verifying Mvc ActionResults and for easy setup of ControllerContext and HttpContext for both Mvc and WebApi TestBase.Shoulds ------------------- Chainable fluent assertions get you to the point concisely ControllerUnderTest.Action() .ShouldbeViewResult() .ShouldHaveModel<TModel>() .ShouldEqualByValue(expected) ControllerUnderTest.Action() .ShouldBeRedirectToRouteResult() .ShouldHaveRouteValue("expectedKey", [Optional] "expectedValue"); ShouldHaveViewDataContaining(), ShouldBeJsonResult() etc. TestBase ---------- Controller extensions to fake the http request & context. By injecting the RegisterRoutes method of your MvcApplication, you can use and test Controller.Url with your application's configured routes. ControllerUnderTest .WithHttpContextAndRoutes( [Optional] Action<RouteCollection> mvcApplicationRoutesRegistration, [optional] string requestUrl, [Optional] string query = "", [Optional] string appVirtualPath = "/", [Optional] HttpApplication applicationInstance) ApiControllerUnderTest.WithWebApiHttpContext<T>( HttpMethod httpMethod, [Optional] string requestUri, [Optional] string routeTemplate)
Xamarin Library to load images quickly and easily. Features: - Xamarin.iOS, Xamarin.Android, Xamarin.Forms, Xamarin.Mac and Windows (WinRT, UWP) support - Configurable disk and memory caching - Multiple image views using the same image source (url, path, resource) will use only one bitmap which is cached in memory (less memory usage) - Deduplication of similar download/load requests. *(If 100 similar requests arrive at same time then one real loading will be performed while 99 others will wait).* - Error and loading placeholders support - Images can be automatically downsampled to specified size (less memory usage) - Fluent API which is inspired by Picasso naming - SVG / WebP / GIF support - Image loading Fade-In animations support - Can retry image downloads (RetryCount, RetryDelay) - Android bitmap optimization. Saves 50% of memory by trying not to use transparency channel when possible. - Transformations support - BlurredTransformation - CircleTransformation, RoundedTransformation, CornersTransformation, CropTransformation - ColorSpaceTransformation, GrayscaleTransformation, SepiaTransformation, TintTransformation - FlipTransformation, RotateTransformation - Supports custom transformations (native platform `ITransformation` implementations)
Fluent to Valdr Javascript
Xamarin Library to load images quickly and easily on Xamarin.Forms. Ensure you call CachedImageRenderer.Init() on each platform!!! Features: - Xamarin.iOS, Xamarin.Android, Xamarin.Forms, Xamarin.Mac and Windows (WinRT, UWP) support - Configurable disk and memory caching - Multiple image views using the same image source (url, path, resource) will use only one bitmap which is cached in memory (less memory usage) - Deduplication of similar download/load requests. *(If 100 similar requests arrive at same time then one real loading will be performed while 99 others will wait).* - Error and loading placeholders support - Images can be automatically downsampled to specified size (less memory usage) - Fluent API which is inspired by Picasso naming - SVG / WebP / GIF support - Image loading Fade-In animations support - Can retry image downloads (RetryCount, RetryDelay) - Android bitmap optimization. Saves 50% of memory by trying not to use transparency channel when possible. - Transformations support - BlurredTransformation - CircleTransformation, RoundedTransformation, CornersTransformation, CropTransformation - ColorSpaceTransformation, GrayscaleTransformation, SepiaTransformation, TintTransformation - FlipTransformation, RotateTransformation - Supports custom transformations (native platform `ITransformation` implementations)
Windows-specific extensions to Fluent.IO
Create complex Uri paths using fluent syntax
AwesomeAssertions extensions for HappyPath Result type - fluent assertions for Result<T> and Error types.
Extensions for the .NET URI class. Get, set, drop, update URI parts, query items and path items. Fluent interface. No more worrying about part delimiters.
*TestBase* gives you a flying start with - fluent assertions that are simple to extend - sharp error messages - tools to help you test with “heavyweight” dependencies on - AspNetCore.Mvc, AspNet.Mvc 3-5, or WebApi Contexts - HttpClient - Ado.Net - Streams & Logging - Mix & match with your favourite test runners & assertions. # TestBase.HttpClient.Fake ``` //Arrange var httpClient = new FakeHttpClient() .SetupGetUrl("https://host.*/").Returns(request=> "Got:" + request.RequestUri) .SetupGetPath("/uri[Pp]attern/").Returns("stringcontent") .SetupPost(".*").Returns(response) .SetupPost(".*", new byte[]{1,2,3}).Returns(otherResponse) .SetupPost(".*", "a=1&b=2") .Returns( request => "You said : " + request.Content.ReadAsStringAsync().ConfigureFalseGetResult(), HttpStatusCode.Accepted) .Setup(x=>x.RequestUri.PathAndQuery.StartsWith("/this")).Returns(response) .Setup(x=>x.Method ==HttpMethod.Put) .Returns(new HttpResponseMessage(HttpStatusCode.Accepted)); // Act var putResponse = await httpClient.PutAsync("http://localhost/thing", new StringContent("{a=1,b=2}")); var postResponse= await httpClient.PostAsync("http://[::1]/", new StringContent("a=1&b=2")); //Debug httpClient.Invocations .ForEach(async i =>Console.WriteLine("{0} {1}",i.RequestUri, await i.Content.ReadAsStringAsync())); //Assert putResponse.StatusCode.ShouldBe(HttpStatusCode.Accepted); postResponse.ShouldBe(response); // ==> SetupPost(".*").Returns(response) was the first // matched setup. Setups are tried in first-to-last order. httpClient.Verify(x=>x.Method ==HttpMethod.Put, "Expected Put, but no matching invocations."); httpClient.Verify( x=>x.Method ==HttpMethod.Post && x.Content.ReadAsStringAsync().ConfigureFalseGetResult()=="a=1&b=2", "Expected Post a=1&b=2"); httpClient.VerifyAll(); // ==> "Exception : 4 unmatched expectations" ``` ### TestBase Chainable fluent assertions get you to the point concisely. ``` UnitUnderTest.Action() .ShouldNotBeNull() .ShouldEqualByValueExceptFor(new {Id=1, Descr=expected}, ignoreList ) .Payload .ShouldMatchIgnoringCase("I expected this") .Should(someOtherPredicate); .ShouldEqualByValue().ShouldEqualByValueExceptFor(...).ShouldEqualByValueOnMembers() work with all kinds of object and collections, and report what differed. string.ShouldMatch(pattern).ShouldNotMatch().ShouldBeEmpty().ShouldNotBeEmpty() .ShouldNotBeNullOrEmptyOrWhiteSpace().ShouldEqualIgnoringCase() .ShouldContain().ShouldStartWith().ShouldEndWith().ShouldBeContainedIn().ShouldBeOneOf().ShouldNotBeOneOf() numeric.ShouldBeBetween().ShouldEqualWithTolerance()....GreaterThan....LessThan...GreaterOrEqualTo ... ienumerable.ShouldAll().ShouldContain().ShouldNotContain().ShouldBeEmpty().ShouldNotBeEmpty() ... stream.ShouldHaveSameStreamContentAs().ShouldContain() value.ShouldBe().ShouldNotBe().ShouldBeOfType().ShouldBeAssignableTo()... .ShouldAll(predicate), .SingleOrAssertFail()... ``` See also - [TestBase](https://www.nuget.org/packages/TestBase) - [TestBase.AspNetCore.Mvc](https://www.nuget.org/packages/TestBase.AspNetCore.Mvc) - [TestBase-Mvc](https://www.nuget.org/packages/TestBase-Mvc) - [TestBase.AdoNet](https://www.nuget.org/packages/TestBase.AdoNet) - [Serilog.Sinks.ListOfString](https://www.nuget.org/packages/Serilog.Sinks.Listofstring) - [Extensions.Logging.ListOfString](https://www.nuget.org/packages/Extensions.Logging.ListOfString)
Simplify Entity Framework Core Include chains with path-based syntax and reusable specifications
*TestBase* gives you a flying start with - fluent assertions that are easy to extend - sharp error messages - tools to help you test with “heavyweight” dependencies on - AspNetCore.Mvc, AspNet.Mvc or WebApi Contexts - HttpClient - Ado.Net - Streams & Logging TestBase.Mvc is renamed to https://www.nuget.org/packages/TestBase.Mvc.AspNetCore Use https://www.nuget.org/packages/TestBase-Mvc for Mvc 4. Chainable fluent assertions get you to the point concisely: ``` - ShouldEqualByValue() & ShouldEqualByValueExceptFor() work with all kinds of object and collections, and report what differed. - string.ShouldMatch().ShouldEqualIgnoringCase(), ... - numeric.ShouldBeBetween().ShouldEqualWithTolerance(), ... - IEnumerable.ShouldAll().ShouldContain().ShouldNotContain(), ... ``` TestBase.Mvc.AspNetCore & TestBase-Mvc ------------ ``` ControllerUnderTest.Action() .ShouldbeViewResult() .ShouldHaveModel<TModel>() .Payload .ShouldEqualByValueExceptFor(new {Id=1, Payload1=expected}, ignoreFields); ControllerUnderTest.Action() .ShouldBeRedirectToRouteResult() .ShouldHaveRouteValue(""expectedKey"", [Optional] ""expectedValue""); ShouldHaveViewDataContaining(), ShouldBeJsonResult() etc. ``` Quickly test AspNetCore controllers with zero setup using `WithControllerContext()` : ``` [Test] public void ControllerUrlAndOtherPropertiesShouldWorkAsExpected__GivenControllerContext() { var uut = new FakeController().WithControllerContext(); uut.Url.Action(""a"", ""b"").ShouldEqual(""/b/a""); uut.ControllerContext.ShouldNotBeNull(); uut.HttpContext.ShouldBe(uut.ControllerContext.HttpContext); uut.ControllerContext.HttpContext.Request.ShouldNotBeNull(); uut.Request.ShouldNotBeNull(); uut.Response.ShouldNotBeNull(); uut.Url.ShouldNotBeNull(); uut.ViewData.ShouldNotBeNull(); uut.TempData.ShouldNotBeNull(); uut.MyAction(param) .ShouldBeViewResult() .ShouldHaveModel<YouSaidViewModel>() .YouSaid.ShouldBe(param); } [Test] public void ShouldBeViewWithModel_And_UrlHelper_ShouldWork() { var controllerUnderTest = new AController() .WithControllerContext(virtualPathTemplate:""/{Action}/Before/{Controller}""); var result= controllerUnderTest .Action(""SomeController"",""SomeAction"") .ShouldBeViewWithModel<AClass>(""ViewName""); .FooterLink .ShouldBe(""/SomeAction/Before/SomeController""); } ``` ... Or test against complex application dependencies using `HostedMvcTestFixtureBase` and specify your `Startup` class: ``` [TestFixture] public class Tests : HostedMvcTestFixtureBase { [TestCase(""/dummy/action?id={id}"")] public async Task Get_Should_ReturnActionResult(string url) { var id=Guid.NewGuid(); var httpClient=GivenClientForRunningServer<Startup>(); GivenRequestHeaders(httpClient, ""CustomHeader"", ""HeaderValue1""); var result= await httpClient.GetAsync(url.Formatz(new {id})); result .ShouldBe_200Ok() .Content.ReadAsStringAsync().Result .ShouldBe(""Content""); } [TestCase(""/dummy"")] public async Task Put_Should_ReturnA(string url) { var something= new Fixture().Create<Something>(); var jsonBody= new StringContent(something.ToJSon(), Encoding.UTF8, ""application/json""); var httpClient=GivenClientForRunningServer<Startup>(); GivenRequestHeaders(httpClient, ""CustomHeader"", ""HeaderValue1""); var result = await httpClient.PutAsync(url, jsonBody); result.ShouldBe_202Accepted(); DummyController.Putted.ShouldEqualByValue( something ); } } ``` See also - TestBase - TestBase-Mvc for Mvc4 - TestBase.HttpClient.Fake - TestBase.AdoNet - Serilog.Sinks.ListOfString - Extensions.Logging.ListOfString
Provides a set of I/O oriented extension methods methods extending from Xunit.