Пример #1
0
 public void TestLoginFail()
 {
     AllDebrid all = new AllDebrid(username: this.username, password: "false");
     PrivateObject obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(all);
     var result = obj.Invoke("Login", "WrongUsername", "WrongPassword");
     Assert.IsFalse((bool)result);
     Assert.IsNull(obj.GetField("_cookie"));
 }
Пример #2
0
 public void TestLoginSuccess()
 {
     AllDebrid all = new AllDebrid(username: this.username, password: this.password);
     PrivateObject obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(all);
     var result = obj.Invoke("Login", this.username, this.password);
     var attrCookie = obj.GetFieldOrProperty("_cookie");
     var attrDaysLeft = obj.GetFieldOrProperty("daysLeft");
     Assert.IsNotNull(attrCookie);
     Assert.IsTrue((bool)result);
     Assert.IsNotNull(attrDaysLeft);
     
 }
Пример #3
0
		internal static object CreatePrivate(global::SenseNet.ContentRepository.Versioning.VersioningType type, global::SenseNet.ContentRepository.Storage.VersionStatus status, global::SenseNet.ContentRepository.Versioning.StateAction action)
		{
			object[] args = new object[] {
                type,
                status,
                action};
			Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("SenseNet.ContentRepository", "SenseNet.ContentRepository.Versioning.ContentStateMachine", new System.Type[] {
                    typeof(global::SenseNet.ContentRepository.Versioning.VersioningType),
                    typeof(global::SenseNet.ContentRepository.Storage.VersionStatus),
                    typeof(global::SenseNet.ContentRepository.Versioning.StateAction)}, args);
			return priv_obj.Target;
		}
Пример #4
0
 internal static global::IGRSS.SdcService.GetStampDutyCalculationCompletedEventArgs CreatePrivate(object[] results, global::System.Exception exception, bool cancelled, object userState)
 {
     object[] args = new object[] {
         results,
         exception,
         cancelled,
         userState};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::IGRSS.SdcService.GetStampDutyCalculationCompletedEventArgs), new System.Type[] {
             typeof(object).MakeArrayType(),
             typeof(global::System.Exception),
             typeof(bool),
             typeof(object)}, args);
     return ((global::IGRSS.SdcService.GetStampDutyCalculationCompletedEventArgs)(priv_obj.Target));
 }
Пример #5
0
 protected BaseAccessor(object target, Microsoft.VisualStudio.TestTools.UnitTesting.PrivateType type)
 {
     m_privateObject = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(target, type);
 }
Пример #6
0
 internal static object CreatePrivate()
 {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("BusinessLayer", "IGRSS.BusinessObjects.WorkflowServices.ContextService", new System.Type[0], args);
     return priv_obj.Target;
 }
 internal static global::System.EventArgs CreatePrivate()
 {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("Microsoft.VisualStudio.Shell", "Microsoft.VisualStudio.Shell.DialogPage+PageApplyEventArgs", new System.Type[0], args);
     return ((global::System.EventArgs)(priv_obj.Target));
 }
Пример #8
0
 internal static global::System.ComponentModel.DescriptionAttribute CreatePrivate(string description)
 {
     object[] args = new object[] {
         description};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("Microsoft.VisualStudio.Project.Samples.NestedProject", "Microsoft.VisualStudio.Project.Samples.NestedProject.ResourcesDescriptionAttribute", new System.Type[] {
             typeof(string)}, args);
     return ((global::System.ComponentModel.DescriptionAttribute)(priv_obj.Target));
 }
Пример #9
0
 internal static global::System.ComponentModel.DisplayNameAttribute CreatePrivate(string name)
 {
     object[] args = new object[] {
         name};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("Microsoft.VisualStudio.Project.Samples.NestedProject", "Microsoft.VisualStudio.Project.Samples.NestedProject.LocDisplayNameAttribute", new System.Type[] {
             typeof(string)}, args);
     return ((global::System.ComponentModel.DisplayNameAttribute)(priv_obj.Target));
 }
Пример #10
0
 internal static global::FlickrNet.UtilityMethods CreatePrivate()
 {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::FlickrNet.UtilityMethods), new System.Type[0], args);
     return ((global::FlickrNet.UtilityMethods)(priv_obj.Target));
 }
Пример #11
0
 internal static object CreatePrivate()
 {
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("Media.BC", "Media.BC.MediaFileNameParser", new object[0]);
     return priv_obj.Target;
 }
Пример #12
0
 internal static object CreatePrivate() {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("NhsCui.Toolkit", "NhsCui.Toolkit.DateAndTime.Resources.NhsTimeResources", new System.Type[0], args);
     return priv_obj.Target;
 }
Пример #13
0
 internal static object CreatePrivate() {
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("NHLScoreBot", "NHLScoreBot.YahooParser", new object[0]);
     return priv_obj.Target;
 }
Пример #14
0
 internal static object CreatePrivate(string _homeTeam, string _awayTeam) {
     object[] args = new object[] {
             _homeTeam,
             _awayTeam};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("NHLScoreBot", "NHLScoreBot.NHLJacked", new System.Type[] {
                 typeof(string),
                 typeof(string)}, args);
     return priv_obj.Target;
 }
Пример #15
0
 internal static global::Microsoft.Practices.EnterpriseLibrary.Data.Database CreatePrivate(string connectionString, global::System.Data.Common.DbProviderFactory dbProviderFactory) {
     object[] args = new object[] {
             connectionString,
             dbProviderFactory};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::Microsoft.Practices.EnterpriseLibrary.Data.Database), new System.Type[] {
                 typeof(string),
                 typeof(global::System.Data.Common.DbProviderFactory)}, args);
     return ((global::Microsoft.Practices.EnterpriseLibrary.Data.Database)(priv_obj.Target));
 }
Пример #16
0
		internal static global::SenseNet.Portal.Virtualization.PortalContext CreatePrivate(global::System.Web.HttpContext context, string repositoryPath, global::SenseNet.ContentRepository.Storage.Schema.NodeType nodeType, string siteUrl)
		{
			object[] args = new object[] {
                context,
                repositoryPath,
                nodeType,
                siteUrl};
			Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::SenseNet.Portal.Virtualization.PortalContext), new System.Type[] {
                    typeof(global::System.Web.HttpContext),
                    typeof(string),
                    typeof(global::SenseNet.ContentRepository.Storage.Schema.NodeType),
                    typeof(string)}, args);
			return ((global::SenseNet.Portal.Virtualization.PortalContext)(priv_obj.Target));
		}
Пример #17
0
 internal static object CreatePrivate(string[] args)
 {
     object[] _args = new object[] {
         args};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("AjaxMin", "Microsoft.Ajax.Utilities.MainClass", new System.Type[] {
             typeof(string).MakeArrayType()}, _args);
     return priv_obj.Target;
 }
Пример #18
0
 internal static global::System.Exception CreatePrivate(global::Microsoft.Ajax.Utilities.ConsoleOutputMode outputMode)
 {
     object[] args = new object[] {
         outputMode};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("AjaxMin", "Microsoft.Ajax.Utilities.MainClass+UsageException", new System.Type[] {
             typeof(global::Microsoft.Ajax.Utilities.ConsoleOutputMode)}, args);
     return ((global::System.Exception)(priv_obj.Target));
 }
Пример #19
0
 internal static OANestedProjectProperty CreatePrivate(OANestedProjectProperties parent, string name)
 {
     object[] args = new object[] {
         parent,
         name};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(OANestedProjectProperty), new System.Type[] {
             typeof(OANestedProjectProperties),
             typeof(string)}, args);
     return ((OANestedProjectProperty)(priv_obj.Target));
 }
Пример #20
0
 internal static global::System.Exception CreatePrivate(global::Microsoft.Ajax.Utilities.ConsoleOutputMode outputMode, string format, params object[] args)
 {
     object[] _args = new object[] {
         outputMode,
         format,
         args};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("AjaxMin", "Microsoft.Ajax.Utilities.MainClass+UsageException", new System.Type[] {
             typeof(global::Microsoft.Ajax.Utilities.ConsoleOutputMode),
             typeof(string),
             typeof(object).MakeArrayType()}, _args);
     return ((global::System.Exception)(priv_obj.Target));
 }
Пример #21
0
 internal static global::KapitalLib.KapitalManager CreatePrivate()
 {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::KapitalLib.KapitalManager), new System.Type[0], args);
     return ((global::KapitalLib.KapitalManager)(priv_obj.Target));
 }
Пример #22
0
 internal static global::Aga.Controls.Tree.TreeNodeAdv CreatePrivate(global::Aga.Controls.Tree.TreeViewAdv tree, object tag)
 {
     object[] args = new object[] {
         tree,
         tag};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::Aga.Controls.Tree.TreeNodeAdv), new System.Type[] {
             typeof(global::Aga.Controls.Tree.TreeViewAdv),
             typeof(object)}, args);
     return ((global::Aga.Controls.Tree.TreeNodeAdv)(priv_obj.Target));
 }
Пример #23
0
 internal static object CreatePrivate()
 {
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("BusinessLayer", "IGRSS.BusinessObjects.IgrssAdapters", new object[0]);
     return priv_obj.Target;
 }
Пример #24
0
 internal static global::Aga.Controls.Tree.TreeNodeAdv CreatePrivate(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context)
 {
     object[] args = new object[] {
         info,
         context};
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::Aga.Controls.Tree.TreeNodeAdv), new System.Type[] {
             typeof(global::System.Runtime.Serialization.SerializationInfo),
             typeof(global::System.Runtime.Serialization.StreamingContext)}, args);
     return ((global::Aga.Controls.Tree.TreeNodeAdv)(priv_obj.Target));
 }
Пример #25
0
 internal static global::IGRSS.BusinessObjects.WorkflowServices.WorkflowMediator CreatePrivate()
 {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject(typeof(global::IGRSS.BusinessObjects.WorkflowServices.WorkflowMediator), new System.Type[0], args);
     return ((global::IGRSS.BusinessObjects.WorkflowServices.WorkflowMediator)(priv_obj.Target));
 }
Пример #26
0
 internal static object CreatePrivate()
 {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("ImageRakerToolbar", "ImageRakerToolbar.UsageReporter", new System.Type[0], args);
     return priv_obj.Target;
 }
Пример #27
0
 internal static global::System.ComponentModel.Component CreatePrivate()
 {
     object[] args = new object[0];
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("BusinessLayer", "IGRSS.DataAccessLayer.RevenueStampMasterTableAdapters.RevenueStampMasterTableAdap" +
         "ter", new System.Type[0], args);
     return ((global::System.ComponentModel.Component)(priv_obj.Target));
 }
Пример #28
0
 internal static object CreatePrivate()
 {
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("trx2html", "trx2html.ResourceReader", new object[0]);
     return priv_obj.Target;
 }
Пример #29
0
 internal static object CreatePrivate()
 {
     Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("BusinessLayer", "IGRSS.BusinessLogicLayer.Administration.VillageMasterAdmin", new object[0]);
     return priv_obj.Target;
 }
Пример #30
0
		internal static object CreatePrivate()
		{
			Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject priv_obj = new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject("SenseNet.Portal", "SenseNet.Portal.UrlNameValidator", new object[0]);
			return priv_obj.Target;
		}