Exemplo n.º 1
0
 public void ItShouldCreateReportWithJustKz83()
 {
     UstvaKzFields.Create(new Dictionary <int, object>
     {
         [83] = 0m
     })
     .IsRight.Should().BeTrue();
 }
Exemplo n.º 2
0
 public void ItShouldValidateKz83FieldIsCloseToEstimatedValue()
 {
     UstvaKzFields.Create(new Dictionary <int, object>
     {
         [47] = 20,
         [46] = 10,
         [83] = 10
     }).IsLeft.Should().BeTrue();
 }
Exemplo n.º 3
0
 public void ItShouldNotCreateReportWhenSomeTaxFieldsAreGreaterThanAmount()
 {
     UstvaKzFields.Create(new Dictionary <int, object>
     {
         [47] = 10,
         [46] = 10,
         [83] = 10
     }).IsLeft.Should().BeTrue();
 }
Exemplo n.º 4
0
 public void ItShouldRoundValuesInTheRightDirection()
 {
     var kz = UstvaKzFields.Create(new Dictionary <int, object>
     {
         [66] = 9.9811, // should be rounded up
         [81] = 100.9,  // should be rounded down
         [86] = 200,
         [83] = 23.01   // 200 * 0.07 + 100 * 0.19 - 9.99
     }).AssertRight();
 }
Exemplo n.º 5
0
        public void ItShouldCreateReportWithNegativeKz47GreaterThanNegativeKz46()
        {
            var result = UstvaKzFields.Create(new Dictionary <int, object>
            {
                [46] = -100,
                [47] = -10,
                [83] = 10
            });

            result.IsRight.Should().BeTrue();
        }
Exemplo n.º 6
0
        public void ItShouldReturnErrorWhenKz47IsNotPresentedButKz46Is()
        {
            var result = UstvaKzFields.Create(new Dictionary <int, object>
            {
                [46] = 100,
                // 47 is missing, so it must be a validation error
                [83] = 0
            });

            result.IsLeft.Should().BeTrue();
        }
Exemplo n.º 7
0
 public void ItShouldFailOnCreatingEmptyReport()
 {
     UstvaKzFields.Create(new Dictionary <int, object>())
     .IsLeft.Should().BeTrue();
 }