public void FuzzProfileByValue() { var annotation = new FuzzDataAttribute { FuzzProfile = new UnitTestFuzzProfile(), }; Assert.IsType <UnitTestFuzzProfile>(annotation.FuzzProfile); }
public void FuzzProfileByType() { var dataAttribute = new FuzzDataAttribute() { FuzzProfileType = typeof(UnitTestFuzzProfile), }; Assert.IsType <UnitTestFuzzProfile>(dataAttribute.FuzzProfile); }
public void FuzzProfileByTypeNotAFuzzProfile() { var annotation = new FuzzDataAttribute { FuzzProfileType = typeof(object), }; Assert.Throws <ArgumentException>(() => annotation.FuzzProfile); }
public void TestIterations([UniformIntGenerator(Min = 0, Max = 100)] int iterations) { var testMethod = typeof(FuzzDataAttributeTest).GetMethod(nameof(TestIterations)) !; var dataAttribute = new FuzzDataAttribute() { Iterations = iterations, }; var results = dataAttribute.GetData(testMethod); Assert.Equal(results.Count(), iterations); }