Exemplo n.º 1
0
        public void TestAddingStruct_FluentAPI()
        {
            // Arrange
            string   namespaceName = "SlnGen";
            SGStruct @struct       = new SGStruct();

            // Act
            SGNamespace @namespace = new SGNamespace(namespaceName).WithStructs(@struct);

            // Assert
            Assert.IsTrue(@namespace.Structs.Contains(@struct));
        }
Exemplo n.º 2
0
        public void TestAddingMultipleStructs_FluentAPI()
        {
            // Arrange
            string   namespaceName = "SlnGen";
            SGStruct @struct       = new SGStruct();
            SGStruct struct2       = new SGStruct();

            // Act
            SGNamespace @namespace = new SGNamespace(namespaceName).WithStructs(@struct, struct2);

            // Assert
            Assert.IsTrue(@namespace.Structs.ContainsAll(@struct, struct2));
        }
Exemplo n.º 3
0
        public void TestAddingStructs_PropertyInitializer()
        {
            // Arrange
            string   namespaceName = "SlnGen";
            SGStruct @struct       = new SGStruct();
            SGStruct struct2       = new SGStruct();

            // Act
            SGNamespace @namespace = new SGNamespace(namespaceName)
            {
                Structs =
                {
                    @struct,
                    struct2
                }
            };

            // Assert
            Assert.IsTrue(@namespace.Structs.ContainsAll(@struct, struct2));
        }