Jonathan Allen
Jonathan Allen
Normally this turns the leadscrew in response to the spindle, but sometimes that's not what we need. I've seen projects where we have to move the carriage over a specific...
In addition to HTML and PDF, it should export markdown files with the injected code samples. This is needed when populating wiki style sites such as Github.
foreach (var property in Class.Properties.Where(p => !p.IsIndexer && p.CanRead && p.CanWrite && (p.IsNullable || p.Type.HasCommonValues))) { if (property.IsNullable) { @Tag("PropertyAssign") @TestAttribute public void @(Test.ClassName + "_Property_" + property.Name + "_PropertyNullAssigned")...
@{ foreach (var property in Class.Properties.Where(p => !p.IsIndexer && p.CanRead && p.CanWrite && p.Type.HasCommonValues)) { @Tag("INotifyPropertyChanged") @TestAttribute public void @(Test.ClassName + "_Property_" + property.Name + "_NotifyPropertyChanged_SelfAssign") () { var objectUnderTest...
foreach (var constructor in Class.Constructors.Where(c => c.IsCreatable)) { @Tag("Memory") @TestAttribute public void @(Test.ClassName + "_Memory_" + constructor.SafeName)() { Func ctr = () => { try { return new WeakReference( @constructor.GetConstructorCode()...
@Tag("IList") @Tag("Memory") @TestAttribute public void @(Test.ClassName + "_ListT_" + itemType.SafeName + "_AddClear_Memory") () { IList objectUnderTest = CreateObject(); if (objectUnderTest.IsReadOnly) return; Func run = () => { @itemType.FullName newItem; try...
Old Version foreach (var itemType in Class.ListT.Where(t => t.IsCreatable)) { @TestAttribute public void @(Test.ClassName + "_ListT_" + itemType.SafeName + "_Add") () { IList objectUnderTest = CreateObject(); if (objectUnderTest.IsReadOnly) return; var...
System.Collections.Generic.Dictionary GetValues(@Class.FullName objectUnderTest) { var result = new System.Collections.Generic.Dictionary(); @{ foreach (var property in Class.Properties.Where(p => !p.IsIndexer && p.CanRead)) { result["@property.Name"] = [email protected]; } } return result; } System.Collections.Generic.List GetDiffs(System.Collections.Generic.Dictionary...
public partial class @Test.ClassName { @Tag("Exception") @TestAttribute public void @(Test.ClassName + "_Exception_Serializer")() { var objectUnderTest = CreateObject(); var formatter = new BinaryFormatter(); var stream = new MemoryStream(); formatter.Serialize(stream, objectUnderTest); stream.Seek(0,...
foreach (var constructor in Class.Constructors.Where(c => c.IsCreatable)) { @Tag("IEditableObject") @TestAttribute public void @(Test.ClassName + "_IEditableObject_" + constructor.SafeName + "_BeginCancel_Simple")() { @Class.FullName objectUnderTest; try { objectUnderTest = @constructor.GetConstructorCode(); } catch (ArgumentException)...