Skip to content

Commit 7e0cb36

Browse files
committed
Updates package version
2 parents e839fc7 + 24d49d1 commit 7e0cb36

File tree

10 files changed

+297
-14
lines changed

10 files changed

+297
-14
lines changed

src/Lithnet.GoogleApps.MA.UnitTests/Lithnet.GoogleApps.MA.UnitTests.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@
105105
<HintPath>..\packages\Google.GData.Extensions.2.2.0.0\lib\Google.GData.Extensions.dll</HintPath>
106106
<Private>True</Private>
107107
</Reference>
108-
<Reference Include="Lithnet.GoogleApps, Version=1.0.7771.31436, Culture=neutral, processorArchitecture=MSIL">
109-
<HintPath>..\packages\Lithnet.GoogleApps.1.0.7771.31436\lib\net452\Lithnet.GoogleApps.dll</HintPath>
108+
<Reference Include="Lithnet.GoogleApps, Version=1.0.7845.21613, Culture=neutral, processorArchitecture=MSIL">
109+
<HintPath>..\packages\Lithnet.GoogleApps.1.0.7845.21613\lib\net452\Lithnet.GoogleApps.dll</HintPath>
110+
<Private>True</Private>
110111
</Reference>
111112
<Reference Include="Lithnet.Licensing.Core, Version=1.0.8060.35508, Culture=neutral, processorArchitecture=MSIL">
112113
<HintPath>..\packages\Lithnet.Licensing.Core.1.0.8060.35508\lib\netstandard2.0\Lithnet.Licensing.Core.dll</HintPath>

src/Lithnet.GoogleApps.MA.UnitTests/TestParameters.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,29 @@ public ILicenseManager<Features, Skus> LicenseManager
168168
}
169169
}
170170

171+
public IEnumerable<string> LocationsAttributeFixedTypes
172+
{
173+
get
174+
{
175+
yield return "default";
176+
yield return "desk";
177+
yield return "office";
178+
yield return "home";
179+
}
180+
}
181+
182+
public IEnumerable<string> KeywordsAttributeFixedTypes
183+
{
184+
get
185+
{
186+
yield return "mission";
187+
yield return "occupation";
188+
yield return "outlook";
189+
yield return "mykeywords";
190+
}
191+
}
192+
193+
171194
public event EventHandler OnLicenseDataChanged;
172195

173196
public string GetRawLicenseData()

src/Lithnet.GoogleApps.MA.UnitTests/UserTests.cs

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void Add()
3131
{
3232
CSEntryChange cs = CSEntryChange.Create();
3333
cs.ObjectModificationType = ObjectModificationType.Add;
34-
cs.DN = $"something@{UnitTestControl.TestParameters.Domain}";
34+
cs.DN = $"something{Guid.NewGuid()}@{UnitTestControl.TestParameters.Domain}";
3535
cs.ObjectType = SchemaConstants.User;
3636

3737
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("orgUnitPath", "/"));
@@ -63,6 +63,24 @@ public void Add()
6363
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("phones_work", "phwork"));
6464
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("phones_home", "phhome"));
6565

66+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("keywords_mission", "keyword1"));
67+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("keywords_mykeywords", "keyword2"));
68+
69+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_desk_area", "area1"));
70+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_desk_buildingId", "building-id1"));
71+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_desk_deskCode", "desk-code1"));
72+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_desk_floorName", "floor-name1"));
73+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_desk_floorSection", "floor-section1"));
74+
75+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_home_area", "area2"));
76+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_home_buildingId", "building-id2"));
77+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_home_deskCode", "desk-code2"));
78+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_home_floorName", "floor-name2"));
79+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("locations_home_floorSection", "floor-section2"));
80+
81+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("gender_type", "non-binary"));
82+
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("gender_addressMeAs", "they/them/theirs"));
83+
6684
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("ims_work_address", "[email protected]"));
6785
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("ims_work_protocol", "proto"));
6886

@@ -94,7 +112,7 @@ public void Add()
94112
Assert.AreEqual("gn", e.Name.GivenName);
95113
Assert.AreEqual("sn", e.Name.FamilyName);
96114

97-
Assert.AreEqual(true, e.IsAdmin);
115+
// Assert.AreEqual(true, e.IsAdmin);
98116

99117
Assert.AreEqual(2, e.ExternalIds.Count);
100118
Assert.AreEqual("eidwork", e.ExternalIds[0].Value);
@@ -114,6 +132,26 @@ public void Add()
114132
Assert.AreEqual("phwork", e.Phones[0].Value);
115133
Assert.AreEqual("phhome", e.Phones[1].Value);
116134

135+
Assert.AreEqual(2, e.Keywords.Count);
136+
Assert.AreEqual("keyword1", e.Keywords[0].Value);
137+
Assert.AreEqual("keyword2", e.Keywords[1].Value);
138+
139+
Assert.AreEqual(2, e.Locations.Count);
140+
Assert.AreEqual("area1", e.Locations[0].Area);
141+
Assert.AreEqual("building-id1", e.Locations[0].BuildingId);
142+
Assert.AreEqual("desk-code1", e.Locations[0].DeskCode);
143+
Assert.AreEqual("floor-name1", e.Locations[0].FloorName);
144+
Assert.AreEqual("floor-section1", e.Locations[0].FloorSection);
145+
146+
Assert.AreEqual("area2", e.Locations[1].Area);
147+
Assert.AreEqual("building-id2", e.Locations[1].BuildingId);
148+
Assert.AreEqual("desk-code2", e.Locations[1].DeskCode);
149+
Assert.AreEqual("floor-name2", e.Locations[1].FloorName);
150+
Assert.AreEqual("floor-section2", e.Locations[1].FloorSection);
151+
152+
Assert.AreEqual("non-binary", e.Gender.GenderValue);
153+
Assert.AreEqual("they/them/theirs", e.Gender.AddressMeAs);
154+
117155
Assert.AreEqual(1, e.Ims.Count);
118156
Assert.AreEqual("[email protected]", e.Ims[0].IMAddress);
119157
Assert.AreEqual("proto", e.Ims[0].Protocol);
@@ -290,7 +328,7 @@ public void Update()
290328
cs.AnchorAttributes.Add(AnchorAttribute.Create("id", id));
291329

292330
cs.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("orgUnitPath", "/Unit testing"));
293-
331+
294332
try
295333
{
296334
CSEntryChangeResult result =
@@ -306,7 +344,7 @@ public void Update()
306344
e = UnitTestControl.TestParameters.UsersService.Get(id);
307345
Assert.AreEqual(cs.DN, e.PrimaryEmail);
308346
Assert.AreEqual("/Unit testing", e.OrgUnitPath);
309-
347+
310348
}
311349
finally
312350
{
@@ -523,7 +561,7 @@ public void RemoveAliases()
523561

524562
UnitTestControl.TestParameters.UsersService.AddAlias(id, alias1);
525563
UnitTestControl.TestParameters.UsersService.AddAlias(id, alias2);
526-
564+
527565
Thread.Sleep(UnitTestControl.PostGoogleOperationSleepInterval);
528566

529567
CSEntryChange cs = CSEntryChange.Create();
@@ -876,7 +914,7 @@ public void TakeAdmin()
876914
try
877915
{
878916
UnitTestControl.TestParameters.UsersService.MakeAdmin(true, e.Id);
879-
917+
880918
Thread.Sleep(UnitTestControl.PostGoogleOperationSleepInterval);
881919

882920
CSEntryChange cs = CSEntryChange.Create();

src/Lithnet.GoogleApps.MA.UnitTests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<package id="Google.GData.Client" version="2.2.0.0" targetFramework="net452" />
1414
<package id="Google.GData.Contacts" version="2.2.0.0" targetFramework="net452" />
1515
<package id="Google.GData.Extensions" version="2.2.0.0" targetFramework="net452" />
16-
<package id="Lithnet.GoogleApps" version="1.0.7771.31436" targetFramework="net452" />
16+
<package id="Lithnet.GoogleApps" version="1.0.7845.21613" targetFramework="net472" />
1717
<package id="Lithnet.Licensing.Core" version="1.0.8060.35508" targetFramework="net472" />
1818
<package id="Lithnet.Logging" version="1.0.5774.20685" targetFramework="net452" />
1919
<package id="Lithnet.MetadirectoryServices" version="1.0.7578.14947" targetFramework="net452" />

src/Lithnet.GoogleApps.MA/Interfaces/IManagementAgentParameters.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ internal interface IManagementAgentParameters
7979

8080
IEnumerable<string> PhonesAttributeFixedTypes { get; }
8181

82+
IEnumerable<string> LocationsAttributeFixedTypes { get; }
83+
84+
IEnumerable<string> KeywordsAttributeFixedTypes { get; }
85+
8286
IEnumerable<string> OrganizationsAttributeFixedTypes { get; }
8387

8488
IEnumerable<string> EmailsAttributeFixedTypes { get; }

src/Lithnet.GoogleApps.MA/Lithnet.GoogleApps.MA.csproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,9 @@
213213
<HintPath>..\packages\Google.GData.Extensions.2.2.0.0\lib\Google.GData.Extensions.dll</HintPath>
214214
<Private>True</Private>
215215
</Reference>
216-
<Reference Include="Lithnet.GoogleApps, Version=1.0.7771.31436, Culture=neutral, processorArchitecture=MSIL">
217-
<HintPath>..\packages\Lithnet.GoogleApps.1.0.7771.31436\lib\net452\Lithnet.GoogleApps.dll</HintPath>
216+
<Reference Include="Lithnet.GoogleApps, Version=1.0.7845.21613, Culture=neutral, processorArchitecture=MSIL">
217+
<HintPath>..\packages\Lithnet.GoogleApps.1.0.7845.21613\lib\net452\Lithnet.GoogleApps.dll</HintPath>
218+
<Private>True</Private>
218219
</Reference>
219220
<Reference Include="Lithnet.Licensing.Core, Version=1.0.8060.35508, Culture=neutral, processorArchitecture=MSIL">
220221
<HintPath>..\packages\Lithnet.Licensing.Core.1.0.8060.35508\lib\netstandard2.0\Lithnet.Licensing.Core.dll</HintPath>
@@ -310,8 +311,10 @@
310311
<ItemGroup />
311312
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
312313
<PropertyGroup>
313-
<PreBuildEvent>del $(ProjectDir)$(ProjectName).PackagedMA.xml /f
314-
"C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\mapackager.exe" /e:$(ProjectDir)ExportedMA.xml /c:$(ProjectDir)MAPackageInformation.xml /o:$(ProjectDir)$(ProjectName).PackagedMA.xml</PreBuildEvent>
314+
<PreBuildEvent>
315+
del $(ProjectDir)$(ProjectName).PackagedMA.xml /f
316+
"C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\mapackager.exe" /e:$(ProjectDir)ExportedMA.xml /c:$(ProjectDir)MAPackageInformation.xml /o:$(ProjectDir)$(ProjectName).PackagedMA.xml
317+
</PreBuildEvent>
315318
<PostBuildEvent>call %25BuildToolsPath%25\sign-and-save-symbols.bat $(TargetPath) $(TargetDir) $(ProjectName)</PostBuildEvent>
316319
</PropertyGroup>
317320
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

src/Lithnet.GoogleApps.MA/ManagementAgentParameters.cs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,56 @@ public override string KeyFilePassword
696696
}
697697
}
698698

699+
public IEnumerable<string> LocationsAttributeFixedTypes
700+
{
701+
get
702+
{
703+
if (this.configParameters.Contains(ManagementAgentParametersBase.LocationsFixedTypeFormatParameter))
704+
{
705+
string value = this.configParameters[ManagementAgentParametersBase.LocationsFixedTypeFormatParameter].Value;
706+
707+
if (string.IsNullOrWhiteSpace(value))
708+
{
709+
yield break;
710+
}
711+
712+
foreach (string name in value.Split('\n'))
713+
{
714+
yield return name;
715+
}
716+
}
717+
else
718+
{
719+
yield break;
720+
}
721+
}
722+
}
723+
724+
public IEnumerable<string> KeywordsAttributeFixedTypes
725+
{
726+
get
727+
{
728+
if (this.configParameters.Contains(ManagementAgentParametersBase.KeywordsFixedTypeFormatParameter))
729+
{
730+
string value = this.configParameters[ManagementAgentParametersBase.KeywordsFixedTypeFormatParameter].Value;
731+
732+
if (string.IsNullOrWhiteSpace(value))
733+
{
734+
yield break;
735+
}
736+
737+
foreach (string name in value.Split('\n'))
738+
{
739+
yield return name;
740+
}
741+
}
742+
else
743+
{
744+
yield break;
745+
}
746+
}
747+
}
748+
699749
public static IList<ConfigParameterDefinition> GetParameters(KeyedCollection<string, ConfigParameter> configParameters, ConfigParameterPage page)
700750
{
701751
List<ConfigParameterDefinition> parameters = new List<ConfigParameterDefinition>();
@@ -775,6 +825,12 @@ public static IList<ConfigParameterDefinition> GetParameters(KeyedCollection<str
775825
parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.WebsitesFixedTypeFormatParameter, null));
776826
parameters.Add(ConfigParameterDefinition.CreateDividerParameter());
777827

828+
parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.LocationsFixedTypeFormatParameter, null));
829+
parameters.Add(ConfigParameterDefinition.CreateDividerParameter());
830+
831+
parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.KeywordsFixedTypeFormatParameter, null));
832+
parameters.Add(ConfigParameterDefinition.CreateDividerParameter());
833+
778834
parameters.Add(ConfigParameterDefinition.CreateDividerParameter());
779835
parameters.Add(ConfigParameterDefinition.CreateDropDownParameter(ManagementAgentParametersBase.CalendarBuildingAttributeTypeParameter, new string[] { "String", "Reference" }, false, "String"));
780836
parameters.Add(ConfigParameterDefinition.CreateDropDownParameter(ManagementAgentParametersBase.CalendarFeatureAttributeTypeParameter, new string[] { "String", "Reference" }, false, "String"));

src/Lithnet.GoogleApps.MA/ManagementAgentParametersBase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ internal abstract class ManagementAgentParametersBase
8181

8282
protected const string AddressesFixedTypeFormatParameter = "Addresses fixed types";
8383

84+
protected const string LocationsFixedTypeFormatParameter = "Locations fixed types";
85+
86+
protected const string KeywordsFixedTypeFormatParameter = "Keywords fixed types";
87+
8488
protected const string EmailsFixedTypeFormatParameter = "Email fixed types";
8589

8690
protected const string CustomUserObjectClassesParameter = "Custom user object classes";

0 commit comments

Comments
 (0)