We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
foreach (var property in Class.Properties.Where(p => !p.IsIndexer && p.CanRead && p.CanWrite && (p.IsNullable || p.Type.HasCommonValues))) { if (property.IsNullable) { <text> @Tag("PropertyAssign") @TestAttribute public void @(Test.ClassName + "_Property_" + property.Name + "_PropertyNullAssigned") () { var objectUnderTest = CreateObject(); try { [email protected] = null; @Assert.IsNull("objectUnderTest." + @property.Name); } catch (System.ArgumentNullException) { //OK return; } } </text> } if (property.Type.HasCommonValues) { var testCount = 1; foreach (var testValue in property.Type.CommonValues) { <text> @Tag("PropertyAssign") @TestAttribute public void @(Test.ClassName + "_Property_" + property.Name + "_PropertyAssigned_" + testCount) () { var objectUnderTest = CreateObject(); @property.Type.FullName expectedValue; </text> <text> try { expectedValue = @testValue; [email protected] = expectedValue; @Assert.AreEqual(@property.Type, "expectedValue", "objectUnderTest." + @property.Name); } catch (System.ArgumentException) { //OK return; } </text> <text> } </text> testCount++; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: