public void Should_get_data_token_if_DataContractAttribute_is_found_with_name_and_namespace() { var tokenProvider = new DataContractTypeTokenProvider(); Assert.AreEqual( tokenProvider.GetTypeToken<TestClassWithDataContractAttributeWithNameAndNamespace>(), String.Format("{0}|{1}", TestClassNamespace, TestClassName)); }
public void Should_get_data_token_if_DataContractAttribute_is_found() { var tokenProvider = new DataContractTypeTokenProvider(); Assert.AreEqual( tokenProvider.GetTypeToken<TestClassWithDataContractAttribute>(), (typeof (TestClassWithDataContractAttribute).Name)); }
public void Should_get_null_data_token_if_DataContractAttribute_is_not_found_on_target_type() { var tokenProvider = new DataContractTypeTokenProvider(); Assert.IsNull(tokenProvider.GetTypeToken <TestClassWithoutDataContractAttribute>()); }
public void Should_get_data_token_if_DataContractAttribute_is_found_with_name() { var tokenProvider = new DataContractTypeTokenProvider(); Assert.AreEqual(tokenProvider.GetTypeToken <TestClassWithDataContractAttributeWithName>(), TestClassName); }
public void Should_get_null_data_token_if_DataContractAttribute_is_not_found_on_target_type() { var tokenProvider = new DataContractTypeTokenProvider(); Assert.IsNull(tokenProvider.GetTypeToken<TestClassWithoutDataContractAttribute>()); }
public void Should_get_data_token_if_DataContractAttribute_is_found_with_name() { var tokenProvider = new DataContractTypeTokenProvider(); Assert.AreEqual(tokenProvider.GetTypeToken<TestClassWithDataContractAttributeWithName>(), TestClassName); }