Example #1
0
        public void Use_the_specified_HTTP_Client(HttpClient client)
        {
            // Arrange/Act
            var sut = new TeslaAuthClient(client);

            // Assert
            sut.Client.Should().BeSameAs(client);
        }
Example #2
0
        public void Use_the_specified_Base_Uri(Uri baseUri)
        {
            // Arrange/Act
            var sut = new TeslaAuthClient(baseUri);

            // Assert
            sut.BaseUri.Should().BeSameAs(baseUri);
        }
Example #3
0
        public void Be_of_Type_ITeslaAuthClient()
        {
            // Arrange/Act
            var sut = new TeslaAuthClient();

            // Assert
            sut.Should().BeAssignableTo <ITeslaAuthClient>();
        }
Example #4
0
        public void Use_the_specified_HTTP_Client_and_Base_Uri(Uri baseUri, HttpClient client)
        {
            // Arrange/Act
            var sut = new TeslaAuthClient(baseUri, client);

            // Assert
            sut.BaseUri.Should().BeSameAs(baseUri);
            sut.Client.Should().BeSameAs(client);
        }
Example #5
0
        public void Dispose_The_HttpClient()
        {
            // Arrange
            var sut = new TeslaAuthClient();

            // Act
            sut.Dispose();

            // Assert
            sut.Client.Should().BeNull();
            sut.BaseUri.Should().BeNull();
        }