public void Called_MaxAgeSet(int maxAgeHours, int expected)
        {
            //Arrange
            ExpectCtOptionsBuilder builder = new ExpectCtOptionsBuilder();

            //Act
            builder.SetMaxAge(TimeSpan.FromHours(maxAgeHours));

            //Assert
            ExpectCtOptions result = builder.Build();

            Assert.Equal(expected, result.MaxAge);
        }
        public void Called_EnforceSet()
        {
            //Arrange
            ExpectCtOptionsBuilder builder = new ExpectCtOptionsBuilder();

            //Act
            builder.Enforce();

            //Assert
            ExpectCtOptions result = builder.Build();

            Assert.True(result.Enforce);
        }
Пример #3
0
        public void Called_EnforceSet()
        {
            //Arrange
            ExpectCtOptionsBuilder builder = new ExpectCtOptionsBuilder();

            //Act
            string reportUri = "https://example.com/some-route";

            builder.SetReportUri(reportUri);

            //Assert
            ExpectCtOptions result = builder.Build();

            Assert.Equal(reportUri, result.ReportUri);
        }