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)); }
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)); }
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)); }