You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) |
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) |
|
|
|
using System; |
|
using System.Collections.Generic; |
|
using ICSharpCode.UnitTesting; |
|
using ICSharpCode.SharpDevelop.Dom; |
|
using NUnit.Framework; |
|
|
|
namespace UnitTesting.Tests.Utils.Tests |
|
{ |
|
[TestFixture] |
|
public class CreateMockMethodWithSingleAttributeTestFixture |
|
{ |
|
MockMethod mockMethod; |
|
MockAttribute firstAttribute; |
|
|
|
[SetUp] |
|
public void Init() |
|
{ |
|
firstAttribute = new MockAttribute("first"); |
|
mockMethod = MockMethod.CreateMockMethodWithAttribute(firstAttribute); |
|
} |
|
|
|
[Test] |
|
public void DeclaringTypeProjectContentLanguageIsCSharp() |
|
{ |
|
Assert.AreEqual(LanguageProperties.CSharp, mockMethod.DeclaringType.ProjectContent.Language); |
|
} |
|
|
|
[Test] |
|
public void ProjectContentProjectIsMockCSharpProject() |
|
{ |
|
Assert.IsNotNull(mockMethod.DeclaringType.ProjectContent.Project as MockCSharpProject); |
|
} |
|
|
|
[Test] |
|
public void MethodHasOneAttribute() |
|
{ |
|
Assert.AreEqual(1, mockMethod.Attributes.Count); |
|
} |
|
|
|
[Test] |
|
public void FirstClassAttributeHasAttributeTypeWithFullyQualifiedNameOfFirst() |
|
{ |
|
Assert.AreEqual("first", mockMethod.Attributes[0].AttributeType.FullyQualifiedName); |
|
} |
|
} |
|
}
|
|
|