public void ExtensionProviderShouldReturnReflectedProperties() { MockExtensionProvider provider = new MockExtensionProvider(); Assert.AreEqual(provider.Id, new Guid("02568D23-44A9-4f09-925E-91A6FF7742F3"), "Not Equal"); Assert.AreEqual(provider.Name, "ABC 123", "Not Equal"); Assert.AreEqual(provider.Description, "TestableExtensionProvider", "Not Equal"); }
public void ExtensionProviderContainerConverterConvertToExtensionProvider() { MockExtensionProvider provider = new MockExtensionProvider(); MockServiceProvider mockServiceProvider = new MockServiceProvider(); MockServiceProviderService mockService = new MockServiceProviderService(); mockServiceProvider.AddService(typeof(IExtensionProviderService), mockService); ExtensionProviderConverter converter = new ExtensionProviderConverter(mockServiceProvider); MockExtensionProvider provider1 = converter.ConvertFrom(provider.ToString()) as MockExtensionProvider; Assert.AreEqual(provider.Id, provider1.Id, "Not Equal"); Assert.AreEqual(provider.Description, provider1.Description, "Not Equal"); Assert.AreEqual(provider.Name, provider1.Name, "Not Equal"); }
public void ExtensionProviderShouldReturnOverrideToStringMethod() { MockExtensionProvider provider = new MockExtensionProvider(); Assert.AreEqual(provider.ToString(), String.Format("{0}|{1}|{2}", provider.Id.ToString("b"), provider.Name, provider.Description), "Not Equal"); }