-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for amending constructors
- Loading branch information
1 parent
a45f981
commit 95a0e74
Showing
9 changed files
with
351 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
|
||
namespace Afterthought.UnitTest.Target | ||
{ | ||
[Afterthought.Amendment(typeof(amend<>))] | ||
public class junk | ||
{ | ||
public static void Main() | ||
{ | ||
Console.WriteLine("Test"); | ||
} | ||
} | ||
|
||
public class amend<T> : Amendment<T, T> | ||
{ | ||
public override void Amend() | ||
{ | ||
AddProperty(new Property<int>("Count")); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
//----------------------------------------------------------------------------- | ||
// | ||
// Copyright (c) VC3, Inc. All rights reserved. | ||
// This code is licensed under the Microsoft Public License. | ||
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF | ||
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY | ||
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR | ||
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. | ||
// | ||
//----------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Text; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Afterthought.UnitTest.Target; | ||
|
||
namespace Afterthought.UnitTest | ||
{ | ||
[TestClass] | ||
public class ConstructorTests | ||
{ | ||
Calculator Calculator { get; set; } | ||
|
||
[TestInitialize] | ||
public void InitializeCalculator() | ||
{ | ||
Calculator = new Calculator(); | ||
} | ||
|
||
/// <summary> | ||
/// Tests adding a new public constructor to a type. | ||
/// </summary> | ||
[TestMethod] | ||
public void AddConstructor() | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Tests modifying an existing constructor to run code before the original method | ||
/// implementation without affecting the values of the specified parameters. | ||
/// </summary> | ||
[TestMethod] | ||
public void BeforeConstructorWithoutChangesGeneric() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Tests modifying an existing constructor to run code before the original method | ||
/// implementation without affecting the values of the specified parameters. | ||
/// </summary> | ||
[TestMethod] | ||
public void BeforeConstructorWithoutChangesArray() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Tests modifying an existing constructor to run code before the original method | ||
/// implementation without affecting the values of the specified parameters. | ||
/// </summary> | ||
[TestMethod] | ||
public void BeforeConstructorWithChangesGeneric() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Tests modifying an existing constructor to run code before the original method | ||
/// implementation without affecting the values of the specified parameters. | ||
/// </summary> | ||
[TestMethod] | ||
public void BeforeConstructorWithChangesArray() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Tests modifying an existing constructor to run code after the original method | ||
/// implementation that does not return a value. | ||
/// </summary> | ||
[TestMethod] | ||
public void AfterConstructorGeneric() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Tests modifying an existing constructor to run code after the original method | ||
/// implementation that does not return a value. | ||
/// </summary> | ||
[TestMethod] | ||
public void AfterConstructorArray() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Tests modifying an existing constructor to completely replace the implementation. | ||
/// </summary> | ||
[TestMethod] | ||
public void ImplementConstructor() | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.