Exemple #1
0
        public void ShouldNotThrowGivenMatchingPrimitive()
        {
            //Arrange
            ClassVariableTypeValidation subject = new ClassVariableTypeValidation()
                                                  .FieldShouldBeType <string>("_value", "stringValue");
            VariabledClass target = new VariabledClass();

            //Act
            subject.AssertFieldsAreExpectedType(target);

            //Assert
        }
Exemple #2
0
        public void ShouldNotThrowGivenSameObject()
        {
            //Arrange
            VariabledClass expectedValue        = new VariabledClass();
            ExampleObject  exampleObject        = new ExampleObject(expectedValue);
            ClassVariableTypeValidation subject = new ClassVariableTypeValidation()
                                                  .FieldShouldBeType <VariabledClass>("_variable", expectedValue);

            //Act
            Action action = () => subject.AssertFieldsAreExpectedType(exampleObject);

            //Assert
            action.Should().NotThrow();
        }
Exemple #3
0
 public ExampleObject(VariabledClass variable) => _variable = variable;