Ejemplo n.º 1
0
 public void ShouldNotResolveTypeByNamespaceOnly()
 {
     WhenLookingUpSomeCode("SparkSense.Tests.Scenarios.");
     TheResolvedType
     .ShouldBe(null);
     TheRemainingCode
     .ShouldBe("SparkSense.Tests.Scenarios.");
 }
Ejemplo n.º 2
0
 public void ShouldTryResolveTypeByPartialFullName()
 {
     WhenLookingUpSomeCode("Scenarios.TypeResolutionScenario.StubType.");
     TheResolvedType
     .ShouldNotBeNull()
     .Name.ShouldBe("StubType");
     TheRemainingCode
     .ShouldBe(string.Empty);
 }
Ejemplo n.º 3
0
 public void ShouldTryResolveTypeByName()
 {
     WhenLookingUpSomeCode("StubType.");
     TheResolvedType
     .ShouldNotBeNull()
     .Name.ShouldBe("StubType");
     TheRemainingCode
     .ShouldBe(string.Empty);
 }
Ejemplo n.º 4
0
        public void ShouldTryResolveTypeByKeyword()
        {
            WhenLookingUpSomeCode("this.");
            TheResolvedType
            .ShouldNotBeNull()
            .Name.ShouldBe("AbstractSparkView");
            TheRemainingCode
            .ShouldBe(string.Empty);

            WhenLookingUpSomeCode("this.OutputScope(");
            TheResolvedType
            .ShouldNotBeNull()
            .Name.ShouldBe("AbstractSparkView");
            TheRemainingCode
            .ShouldBe("OutputScope(");
        }
Ejemplo n.º 5
0
        public void ShouldTryResolveTypeByNameAndMember()
        {
            WhenLookingUpSomeCode("StubType.StubInstanceProperty.");
            TheResolvedType
            .ShouldNotBeNull()
            .Name.ShouldBe("StubType");
            TheRemainingCode
            .ShouldBe("StubInstanceProperty");

            WhenLookingUpSomeCode("String.ToLower(");
            TheResolvedType
            .ShouldNotBeNull()
            .Name.ShouldBe("String");
            TheRemainingCode
            .ShouldBe("ToLower(");

            WhenLookingUpSomeCode("String.ToLower().ToUpper(");
            TheResolvedType
            .ShouldNotBeNull()
            .Name.ShouldBe("String");
            TheRemainingCode
            .ShouldBe("ToLower().ToUpper(");
        }