Enclosing a bunch of test only code within #if TESTING
This commit is contained in:
parent
5b4aed8dcc
commit
0929aa23df
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNet.Authentication;
|
||||
#if TESTING
|
||||
using Microsoft.AspNet.Authentication;
|
||||
using Microsoft.AspNet.Http.Authentication;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
|
@ -29,4 +30,5 @@ namespace MusicStore.Mocks.Common
|
|||
return JsonConvert.DeserializeObject<AuthenticationProperties>(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
#if TESTING
|
||||
using System;
|
||||
|
||||
namespace MusicStore.Mocks.Common
|
||||
{
|
||||
|
|
@ -12,4 +13,5 @@ namespace MusicStore.Mocks.Common
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net.Http;
|
||||
#if TESTING
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http.Collections;
|
||||
|
|
@ -46,4 +47,5 @@ namespace MusicStore.Mocks.Facebook
|
|||
return await Task.FromResult(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
#if TESTING
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -55,4 +56,5 @@ namespace MusicStore.Mocks.Facebook
|
|||
context.Response.Redirect(context.RedirectUri + "&custom_redirect_uri=custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net.Http;
|
||||
#if TESTING
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -46,4 +47,5 @@ namespace MusicStore.Mocks.Google
|
|||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
#if TESTING
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -54,4 +55,5 @@ namespace MusicStore.Mocks.Google
|
|||
context.Response.Redirect(context.RedirectUri + "&custom_redirect_uri=custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net.Http;
|
||||
#if TESTING
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -46,4 +47,5 @@ namespace MusicStore.Mocks.MicrosoftAccount
|
|||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
#if TESTING
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -55,4 +56,5 @@ namespace MusicStore.Mocks.MicrosoftAccount
|
|||
context.Response.Redirect(context.RedirectUri + "&custom_redirect_uri=custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNet.Authentication;
|
||||
#if TESTING
|
||||
using Microsoft.AspNet.Authentication;
|
||||
|
||||
namespace MusicStore.Mocks.OpenIdConnect
|
||||
{
|
||||
|
|
@ -15,4 +16,5 @@ namespace MusicStore.Mocks.OpenIdConnect
|
|||
return protectedText == "protectedString" ? _capturedNonce : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.IO;
|
||||
#if TESTING
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -28,4 +29,5 @@ namespace MusicStore.Mocks.OpenIdConnect
|
|||
return Task.FromResult(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
#if TESTING
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authentication.Notifications;
|
||||
|
|
@ -69,4 +70,5 @@ namespace MusicStore.Mocks.OpenIdConnect
|
|||
await Task.FromResult(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#if TESTING
|
||||
using System;
|
||||
using Microsoft.AspNet.Authentication.OpenIdConnect;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
|
|
@ -165,4 +166,5 @@ namespace MusicStore
|
|||
SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
#if TESTING
|
||||
using System;
|
||||
using Microsoft.AspNet.Authentication.Facebook;
|
||||
using Microsoft.AspNet.Authentication.Google;
|
||||
using Microsoft.AspNet.Authentication.MicrosoftAccount;
|
||||
|
|
@ -224,4 +225,5 @@ namespace MusicStore
|
|||
SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNet.Authentication;
|
||||
#if TESTING
|
||||
using Microsoft.AspNet.Authentication;
|
||||
using Microsoft.AspNet.Authentication.Twitter.Messages;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
|
@ -33,4 +34,5 @@ namespace MusicStore.Mocks.Twitter
|
|||
return JsonConvert.DeserializeObject<RequestToken>(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
#if TESTING
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
|
|
@ -59,4 +60,5 @@ namespace MusicStore.Mocks.Twitter
|
|||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Linq;
|
||||
#if TESTING
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authentication.Twitter;
|
||||
|
|
@ -48,4 +49,5 @@ namespace MusicStore.Mocks.Twitter
|
|||
context.Response.Redirect(context.RedirectUri + "&custom_redirect_uri=custom");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Reference in New Issue