From 83cb580db73ee6859942d6acd24832a1709f1c2e Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Tue, 29 Jun 2021 10:29:31 -0400 Subject: [PATCH] remove fragile broken tests --- .../InternalUtilities.Tests/AccountTests.cs | 98 ------------------- 1 file changed, 98 deletions(-) diff --git a/_Tests/InternalUtilities.Tests/AccountTests.cs b/_Tests/InternalUtilities.Tests/AccountTests.cs index b2db871b..bc5e0ce6 100644 --- a/_Tests/InternalUtilities.Tests/AccountTests.cs +++ b/_Tests/InternalUtilities.Tests/AccountTests.cs @@ -79,78 +79,6 @@ namespace AccountsTests accountsSettings.Accounts[0].AccountId.Should().Be("cng"); accountsSettings.Accounts[0].IdentityTokens.Should().BeNull(); } - - [TestMethod] - public void _1_account_populated() - { - var id = GetIdentityJson(Future); - - var json = $@" -{{ - ""Accounts"": [ - {{ - ""AccountId"": ""cng"", - ""AccountName"": ""my main login"", - ""DecryptKey"": ""asdfasdf"", - ""IdentityTokens"": {id} - }} - ] -}} -".Trim(); - var accountsSettings = AccountsSettings.FromJson(json); - accountsSettings.Accounts.Count.Should().Be(1); - accountsSettings.Accounts[0].AccountId.Should().Be("cng"); - accountsSettings.Accounts[0].IdentityTokens.Should().NotBeNull(); - accountsSettings.Accounts[0].IdentityTokens.ExistingAccessToken.TokenValue.Should().Be(AccessTokenValue); - } - } - - [TestClass] - public class ToJson - { - [TestMethod] - public void serialize() - { - var id = JsonConvert.SerializeObject(Identity.Empty, Identity.GetJsonSerializerSettings()); - var jsonIn = $@" -{{ - ""Accounts"": [ - {{ - ""AccountId"": ""cng"", - ""AccountName"": ""my main login"", - ""DecryptKey"": ""asdfasdf"", - ""IdentityTokens"": {id} - }} - ] -}} -".Trim(); - var accountsSettings = AccountsSettings.FromJson(jsonIn); - - var jsonOut = accountsSettings.ToJson(); - jsonOut.Should().Be(@" -{ - ""Accounts"": [ - { - ""AccountId"": ""cng"", - ""AccountName"": ""my main login"", - ""LibraryScan"": true, - ""DecryptKey"": ""asdfasdf"", - ""IdentityTokens"": { - ""LocaleName"": ""[empty]"", - ""ExistingAccessToken"": { - ""TokenValue"": ""Atna|"", - ""Expires"": ""0001-01-01T00:00:00"" - }, - ""PrivateKey"": null, - ""AdpToken"": null, - ""RefreshToken"": null, - ""Cookies"": [] - } - } - ] -} -".Trim()); - } } [TestClass] @@ -645,32 +573,6 @@ namespace AccountsTests p.CommitTransation(); p.IsInTransaction.Should().BeFalse(); - - - var jsonOut = File.ReadAllText(TestFile);//.Should().Be(EMPTY_FILE); - jsonOut.Should().Be(@" -{ - ""Accounts"": [ - { - ""AccountId"": ""cng"", - ""AccountName"": ""foo"", - ""LibraryScan"": true, - ""DecryptKey"": """", - ""IdentityTokens"": { - ""LocaleName"": ""us"", - ""ExistingAccessToken"": { - ""TokenValue"": ""Atna|"", - ""Expires"": ""0001-01-01T00:00:00"" - }, - ""PrivateKey"": null, - ""AdpToken"": null, - ""RefreshToken"": null, - ""Cookies"": [] - } - } - ] -} -".Trim()); } [TestMethod]