Ejemplo n.º 1
0
        public void ParseClassMethodAndAssembly()
        {
            //// Arrange
            var datasource = "Mynamespace.MyClass.MyMethod(), MyName.MyAssembly";

            //// Act
            var result = DataSourceModel.Parse(datasource);

            //// Assert
            Assert.That(result, Is.Not.Null);
            Assert.That(result.ClassName, Is.EqualTo("Mynamespace.MyClass"));
            Assert.That(result.AssemblyName, Is.EqualTo("MyName.MyAssembly"));
            Assert.That(result.MemberName, Is.EqualTo("MyMethod"));
            Assert.That(result.MemberType, Is.EqualTo(MemberTypes.Method));
        }
Ejemplo n.º 2
0
        public void ParseClassAndProperty()
        {
            //// Arrange
            var datasource = "Mynamespace.MyClass.MyProp";

            //// Act
            var result = DataSourceModel.Parse(datasource);

            //// Assert
            Assert.That(result, Is.Not.Null);
            Assert.That(result.ClassName, Is.EqualTo("Mynamespace.MyClass"));
            Assert.That(result.AssemblyName, Is.Null);
            Assert.That(result.MemberName, Is.EqualTo("MyProp"));
            Assert.That(result.MemberType, Is.EqualTo(MemberTypes.Property));
        }