public void FromPath_recognizes_NuGet_OData_sources() { var source = Source.ForPath("http://whatever"); source.Should(Be.TypeOf <NuGetOData>()); source.Path.ShouldEqual("http://whatever"); }
public void FromPath_recognizes_DirectoryOfNupkg() { var source = Source.ForPath(Directory.GetCurrentDirectory()); source.Should(Be.TypeOf <DirectoryOfNupkg>()); source.Path.ShouldEqual(Directory.GetCurrentDirectory()); }
public void BlobSerializerTest() { var res = BlobSerializer.Serialize(new TestSagaData { TestValue = "testValue" }); res.Should(Be.Not.Null); var des = BlobSerializer.Deserialize(res, typeof(ISagaEntity).Name); des.Should(Be.Not.Null); des.Should(Be.TypeOf <TestSagaData>()); ((TestSagaData)des).TestValue.Should(Be.EqualTo("testValue")); }
public void it_should_exist() { new Game().Should(Be.TypeOf <Game>()); }
public void ActionPatch() { const string oldMessage = @"<?xml version=""1.0"" encoding=""utf-8""?> <object name="""" type=""TK0"" assembly=""""> <!-- Data section : Don't edit any attributes ! --> <items> <item name=""0"" type=""TK1"" assembly=""""> <properties> <property name=""EntityId"" type=""TK2"" assembly="""">0</property> <property name=""Dto"" type=""TK3"" assembly=""""> <properties> <property name=""ID"" type=""TK2"" assembly="""">1</property> <property name=""RevisionID"" type=""TK2"" assembly="""">1</property> </properties> </property> <property name=""Children"" type=""TK4"" assembly=""""> <items> <item name=""0"" type=""TK5"" assembly=""""> <properties> <property name=""Status"" type=""TK6"" assembly="""">status</property> </properties> </item> <item name=""1"" type=""TK7"" assembly=""""> <properties> <property name=""Comment"" type=""TK6"" assembly="""">comment</property> </properties> </item> <item name=""2"" type=""TK8"" assembly=""""> <properties> <property name=""TimeSpent"" type=""TK9"" assembly="""">10</property> </properties> </item> </items> </property> <property name=""SagaId"" type=""TK10"" assembly="""">00000000-0000-0000-0000-000000000000</property> </properties> </item> </items> <!-- TypeDictionary : Don't edit anything in this section at all ! --> <typedictionary name="""" type=""System.Collections.Hashtable"" assembly=""mscorlib""> <items> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK0</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">Tp.Integration.Messages.PluginLifecycle.IPluginLocalMessage[]</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">Tp.Integration.Messages</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK1</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion.Messages.AssignRevisionToEntityAction</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK3</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">Tp.Integration.Common.RevisionDTO</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">Tp.Integration.Messages</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK8</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion.Comments.Actions.PostTimeAction</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK9</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">System.Decimal</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">mscorlib</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK6</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">System.String</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">mscorlib</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK7</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion.Comments.Actions.PostCommentAction</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK4</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">System.Collections.Generic.List`1[[Tp.Subversion.Comments.IAction, Tp.Subversion, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">mscorlib</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK5</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion.Comments.Actions.ChangeStatusAction</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">Tp.Subversion</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK2</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">System.Int32</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">mscorlib</property> </properties> </property> </properties> </item> <item> <properties> <property name=""Key"" type=""System.String"" assembly=""mscorlib"">TK10</property> <property name=""Value"" type=""Tp.Integration.Messages.ServiceBus.Serialization.TypeInfo"" assembly=""Tp.Integration.Messages""> <properties> <property name=""TypeName"" type=""System.String"" assembly=""mscorlib"">System.Guid</property> <property name=""AssemblyName"" type=""System.String"" assembly=""mscorlib"">mscorlib</property> </properties> </property> </properties> </item> </items> </typedictionary> </object>"; var revisionCreatedLocalMessage = Deserialize(oldMessage); var assignRevisionToEntityAction = revisionCreatedLocalMessage[0] as AssignRevisionToEntityAction; assignRevisionToEntityAction.Dto.ID.Should(Be.EqualTo(1)); assignRevisionToEntityAction.Children[0].Should(Be.TypeOf <ChangeStatusAction>()); ((ChangeStatusAction)assignRevisionToEntityAction.Children[0]).Status.Should(Be.EqualTo("status")); assignRevisionToEntityAction.Children[1].Should(Be.TypeOf <PostCommentAction>()); ((PostCommentAction)assignRevisionToEntityAction.Children[1]).Comment.Should(Be.EqualTo("comment")); assignRevisionToEntityAction.Children[2].Should(Be.TypeOf <PostTimeAction>()); ((PostTimeAction)assignRevisionToEntityAction.Children[2]).TimeSpent.Should(Be.EqualTo(10)); }