private static void CheckLocalizedStrings(List <LocalizedStringData> localizedStrings, TypeSet t, Action CheckContents, ref ParameterType modifiedType) { LocalizedStringData string1 = new LocalizedStringData("string1", ParameterType.Parse("03d7b9f3-cc7e-4639-b809-20f92860c041")); LocalizedStringData string2 = new LocalizedStringData("repeat", ParameterType.Parse("3f0af919-8c61-4863-9039-9d4b59a2b2e6")); LocalizedStringData string3 = new LocalizedStringData("repeat", ParameterType.Parse("3771aec9-a2ea-4f06-a426-fb245de56199")); var a = string1; t.AddLocalizedString(a); localizedStrings.Add(a); Assert.That(modifiedType, Is.EqualTo(a.TypeId)); modifiedType = null; CheckContents(); a = string2; t.AddLocalizedString(a); localizedStrings.Add(a); Assert.That(modifiedType, Is.EqualTo(a.TypeId)); modifiedType = null; CheckContents(); a = string1; t.Remove(a.TypeId); localizedStrings.Remove(a); Assert.That(modifiedType, Is.EqualTo(a.TypeId)); modifiedType = null; CheckContents(); a = string3; t.AddLocalizedString(a); localizedStrings.Add(a); Assert.That(modifiedType, Is.EqualTo(a.TypeId)); modifiedType = null; CheckContents(); LocalizedStringData string2Replacement = new LocalizedStringData("string2 replacement", string2.TypeId); t.ModifyLocalizedString(string2Replacement); localizedStrings[localizedStrings.IndexOf(string2)] = string2Replacement; Assert.That(modifiedType, Is.EqualTo(string2Replacement.TypeId)); modifiedType = null; CheckContents(); LocalizedStringData string3Replacement = new LocalizedStringData("replacement string 3", string3.TypeId); t.RenameType(string3.TypeId, string3Replacement.Name); localizedStrings[localizedStrings.IndexOf(string3)] = string3Replacement; Assert.That(modifiedType, Is.EqualTo(string3Replacement.TypeId)); modifiedType = null; CheckContents(); }