public void CreatingOpenKitConfigurationFromNonNullBuilderGivesNonNullConfiguration() { // when var obtained = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(obtained, Is.Not.Null); }
public void CreatingOpenKitConfigurationFromBuilderCopiesType() { // given, when var target = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(target.OpenKitType, Is.EqualTo(OpenKitType)); _ = mockOpenKitBuilder.Received(1).OpenKitType; }
public void CreatingOpenKitConfigurationFromBuilderCopiesDeviceId() { // given, when var target = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(target.DeviceId, Is.EqualTo(DeviceId)); _ = mockOpenKitBuilder.Received(1).DeviceId; }
public void CreatingAnOpenKitConfigurationFromBuilderCopiesEndpointUrl() { // given, when var target = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(target.EndpointUrl, Is.EqualTo(EndpointUrl)); _ = mockOpenKitBuilder.Received(1).EndpointUrl; }
public void CreatingOpenKitConfigurationFromBuilderCopiesManufacturer() { // given, when var target = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(target.Manufacturer, Is.EqualTo(Manufacturer)); _ = mockOpenKitBuilder.Received(1).Manufacturer; }
public void CreatingOpenKitConfigurationFromBuilderCopiesApplicationVersion() { // given, when var target = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(target.ApplicationVersion, Is.EqualTo(ApplicationVersion)); _ = mockOpenKitBuilder.Received(1).ApplicationVersion; }
public void CreatingOpenKitConfigurationFromBuilderPercentEncodesApplicationId() { // given mockOpenKitBuilder.ApplicationId.Returns("/App_ID%"); var target = OpenKitConfiguration.From(mockOpenKitBuilder); // when var obtained = target.ApplicationIdPercentEncoded; // then Assert.That(obtained, Is.EqualTo("%2FApp%5FID%25")); }
public void CreatingAnOpenKitConfigurationFromBuilderCopiesHttpResponseInterceptor() { // given var responseInterceptor = Substitute.For <IHttpResponseInterceptor>(); mockOpenKitBuilder.HttpResponseInterceptor.Returns(responseInterceptor); // when var target = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(target.HttpResponseInterceptor, Is.SameAs(responseInterceptor)); _ = mockOpenKitBuilder.Received(1).HttpResponseInterceptor; }
public void CreatingOpenKitConfigurationFromBuilderCopiesTrustManager() { // given, when var trustManager = Substitute.For <ISSLTrustManager>(); mockOpenKitBuilder.TrustManager.Returns(trustManager); // when var target = OpenKitConfiguration.From(mockOpenKitBuilder); // then Assert.That(target.TrustManager, Is.SameAs(trustManager)); _ = mockOpenKitBuilder.Received(1).TrustManager; }
public void CreatingOpenKitConfigurationFromNullBuilderGivesNull() { // when, then Assert.That(OpenKitConfiguration.From(null), Is.Null); }