public void RenameResourceCategory_UnitTest_ExecuteWithNoNewCategoryInValues_ExpectedInvalidDataContractException() { var esb = new RenameResource(); var actual = esb.Execute(new Dictionary<string, StringBuilder> { { Guid.Empty.ToString(), new StringBuilder("Test") }, { "Something", null } }, null); Assert.AreEqual(string.Empty, actual); }
public void RenameResourceCategory_UnitTest_ExecuteWithBlankOldCategory_ExpectInvalidDataContractException() { var esb = new RenameResource(); var actual = esb.Execute(new Dictionary<string, StringBuilder> { { Guid.Empty.ToString(), new StringBuilder() } }, null); Assert.AreEqual(string.Empty, actual); }
public void RenameResourceCategory_UnitTest_ExecuteWithNoOldCategoryInValues_ExpectedInvalidDataContractException() { var esb = new RenameResource(); var actual = esb.Execute(new Dictionary<string, StringBuilder> { { "DebugFilePath", null } }, null); Assert.AreEqual(string.Empty, actual); }
public void RenameResourceCategory_UnitTest_ExecuteWithNullValues_ExpectedInvalidDataContractException() { var esb = new RenameResource(); var actual = esb.Execute(null, null); Assert.AreEqual(string.Empty, actual); }
public void RenameResourceCategory_UnitTest_CreateServiceEntry_ExpectedReturnsDynamicService() { var esb = new RenameResource(); var result = esb.CreateServiceEntry(); Assert.AreEqual(esb.HandlesType(), result.Name); Assert.AreEqual("<DataList><ResourceID ColumnIODirection=\"Input\"/><NewName ColumnIODirection=\"Input\"/><Dev2System.ManagmentServicePayload ColumnIODirection=\"Both\"></Dev2System.ManagmentServicePayload></DataList>", result.DataListSpecification.ToString()); Assert.AreEqual(1, result.Actions.Count); var serviceAction = result.Actions[0]; Assert.AreEqual(esb.HandlesType(), serviceAction.Name); Assert.AreEqual(enActionType.InvokeManagementDynamicService, serviceAction.ActionType); Assert.AreEqual(esb.HandlesType(), serviceAction.SourceMethod); }
public void RenameResourceCategory_UnitTest_HandlesType_ExpectedReturnsRenameResourceCategoryService() { var esb = new RenameResource(); var result = esb.HandlesType(); Assert.AreEqual("RenameResourceService", result); }