public async Task GetDetailsShouldReturnConnectionDetailsTest()
        {
            //arang

            var connectionDetails = new ConnectionAcquisition();

            //act
            var result = await connectionDetails.GetDetails();

            //assert
            result.Version.Should().Be(1);
            result.DeviceName.Should().StartWith("X-Ray-/").And.Should().NotBeNull();
            result.IpAddress.Should().NotBeNull();
        }
Пример #2
0
        public void GetDetailsTest()
        {
            //arange
            var connectionAcquisition = new ConnectionAcquisition();

            //act
            var result = connectionAcquisition.GetDetails();

            //assert
            result.DeviceName.Should().BeOfType <string>();
            result.DeviceName.Should().StartWith("X-Ray-/");
            result.DeviceName.Should().Contain(Environment.MachineName);

            result.IpAddress.Should().BeOfType <string>();
            result.IpAddress.Should().NotBeNull();
            result.IpAddress.Should().Match("*.*.*.*");

            result.DeviceName.Should().StartWith("X-Ray-/");
            result.DeviceName.Should().BeOfType <string>();
            result.DeviceName.Should().NotBeNull();
        }